You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to hide a column, and table header for all the columns
I still want to use sort feature in a different way i.e., I will place the sort option right above the table where user can click to change the order of the list view
In this case, Global search and Filter above the table are working as expected where the sorting is not. isSorted and isSortedDesc never changes when I click the sort for the hidden column
Provide an example via Codesandbox! (required) react-table codesandbox to reproduce the issue.
Steps To Reproduce (required)
Click Device Usage, you will see an arrow appears and changes up/down.
Click Memory, you will see an arrow appears and changes up/down.
When you click Name, you will NOT see the same behavior but the list view still orders in the asc order
Expected behavior (Recommended)
Arrow should appear when Name is clicked i.e., isSorted and isSortedDesc must change when clicking the sort option for the hidden column
Desktop (please complete the following information):
OS: MacOS BigSur 11.6
Browser Chrome
Version 96.0
The text was updated successfully, but these errors were encountered:
I don't think this is a possible situation. For the sorting icons to appear, the isVisible must be true, that's the short answer. The long answer is the column must exist in flatHeaders, which depends on headerGroups array. And for a column to be in headerGroups, it must have isVisible = true. If you go to https://github.com/TanStack/react-table/blob/76a4a861ee56b782404ef91987c3b5691ecf2ebc/src/hooks/useTable.js#L364-L369 and change the 2 return statements to true, you will get the result you want. I wouldn't consider this a bug.
This issue has been detected as stale and automatically closed. It's very likely that your issue has remained here this long because it would require breaking changes to v7. React Table v8 is currently in alpha (soon beta!) and already contains bug fixes, performance improvements and architectural changes that likely address this issue.
If your v7 issue has been previously labeled as requiring breaking changes, please try the new v8 alpha/beta releases
If your v7 issue has not already been labeled as a breaking change, open a new issue.
If this was a v8 issue and was closed by mistake, please reopen or leave a comment below.
Describe the bug (required)
isSorted
andisSortedDesc
never changes when I click the sort for the hidden columnProvide an example via Codesandbox! (required)
react-table codesandbox to reproduce the issue.
Steps To Reproduce (required)
Device Usage
, you will see an arrow appears and changes up/down.Memory
, you will see an arrow appears and changes up/down.Name
, you will NOT see the same behavior but the list view still orders in the asc orderExpected behavior (Recommended)
Arrow should appear when
Name
is clicked i.e.,isSorted
andisSortedDesc
must change when clicking the sort option for the hidden columnDesktop (please complete the following information):
The text was updated successfully, but these errors were encountered: