table: useFlexLayout plugin hook error
V7
I’m not sure if I am doing something wrong with the configuration of the useFlexLayout plugin but using it gives the following error: Cannot read property 'columns' of undefined
I am using the plugin as shown below.
const { getTableProps, headerGroups, rows, prepareRow } = useTable({
columns,
data,
},
useFlexLayout
)
This error occurs in version 7.0.0-alpha.13 and above
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 17 (8 by maintainers)
If you urgently need it here’s my updated version, works pretty much the same as the old one and is compatible with alpha.19. Since @tannerlinsley mentioned potential deprecation I guess it can be useful in the future.
Edit: removed some useless function parameters and general cleanup - when I was updating this hook a couple of days ago I only tried to make it work to be honest so I didn’t read too much into the code.
Yes. That’s a good idea.