question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Column Hiding is broken in v7.0 RC10

See original GitHub issue

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:

  1. Open the default column hiding example linked below.
  2. Click “Toggle All” without previous selection, note that it crashes with the error: Uncaught TypeError: Cannot read property 'flatColumns' of undefined.
  3. 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.
  4. Click the same column again, instead of toggling the existing entry the same value will be applied to the array again.
  5. 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
tannerlinsleycommented, Dec 16, 2019

Thanks. I’ll have a fix out asap.

2reactions
tannerlinsleycommented, Dec 18, 2019

Fix is out in RC.13!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found