Describe the bug
Hiding columns stopped working in RC10.
What still works is adding hiddenColumns in initialState, which results in both the corresponding checkbox being unchecked and table column being hidden.
To Reproduce
Steps to reproduce the behavior:
Uncaught TypeError: Cannot read property 'flatColumns' of undefined.hiddenColumns array will contain the selected entry, but the checkbox stays checked. The "Toggle All" checkbox enters an indeterminate state. Also, the actual table column is still visible.hiddenColumns is cleared without an error thrown. The visible table state does not change.Expected behavior
hiddenColumns array in state should result in the table columns actually reflecting these values.Codesandbox
The existing column hiding example stopped working:
https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/column-hiding
Thanks. I'll have a fix out asap.
@tannerlinsley Updating to the latest rc.12 or rc.11 that were releases since does not seem to fix this.
What notably changes is, that "Toggle all" doesn't make the table crash anymore.
Yeah. Still working on a fix here. Hang tight
No pressure, just making sure it wasn't overlooked somehow, thanks for responding so fast :)
Fix is out in RC.13!
Great!
@tannerlinsley I wanted to give some positive Feedback, there is a great performance improvement that I could notice when hiding/showing columns now. ( probably due to the changes in RC.10?)
In a table with 50 rows I can already see a great difference with RC.13 compared to RC.9 before.
Thanks for your outstanding work!
Thanks! It was challenging, but the perf ended up being way better after some tweaks to the architecture. As always, if you are enjoying the library and have the means, consider becoming a Github Sponsor (or even better, getting your company to do it!)
Most helpful comment
Thanks. I'll have a fix out asap.