Column Hiding is broken in v7.0 RC10
See original GitHub issueDescribe 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:
- Open the default column hiding example linked below.
- Click “Toggle All” without previous selection, note that it crashes with the error:
Uncaught TypeError: Cannot read property 'flatColumns' of undefined
. - Reload, this time click one of the column checkboxes first. the displayed
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. - Click the same column again, instead of toggling the existing entry the same value will be applied to the array again.
- Click “Toggle All” with some previous selection, see how the
hiddenColumns
is cleared without an error thrown. The visible table state does not change.
Expected behavior
- Clicking “Toggle All” with no selection should not result in an error.
- Toggling a checkbox should change its checked state.
- Toggling a checkbox should not result in the value being appended to the array multiple times.
- An entry in the
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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Column Hiding is broken in v7.0 RC10 · Issue #1783 - GitHub
Describe the bug Hiding columns stopped working in RC10. What still works is adding hiddenColumns in initialState, which results in both the ...
Read more >Hide column in table in v7.0 - Grafana Labs Community Forums
Hide columns. I am just using the old table panel as it fulfills all my needs, I just hope it is not discontinued...
Read more >Since Upgrade to Vcenter 7.0 U3 no Option to Show...
Is this an Bug from Vcenter U3 that we are not able to Show or Hide Columns in the Vcenter VM Overview ?!?...
Read more >Has column show property stopped working in latest react ...
I had a similar issue as I was using show. Instead of setting show in the column, set the initialState.hiddenColumns , here you...
Read more >Hiding items - IBM
You can hide items in a data module, such as tables, columns, uploaded files, and folders. The hidden items are not visible in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks. I’ll have a fix out asap.
Fix is out in RC.13!