table
table copied to clipboard
[v8] grouped row selection/deselection is not working properly
Describe the bug
When using the getGroupedRowModel, some of the selection behvaior seems to be off:
a) when using table.getToggleAllRowsSelectedHandler(), all rows get selected, but none of the grouped.
b) after manually selecting all groups (or when using table.getToggleAllPageRowsSelectedHandler()), when all rows are deselected, the groups remain selected.
c) when manually selecting all groups and rows, and then deselecting one row of a grouped row, then the group itself remains selected, but the table.getIsAllRowsSelected() checkbox gets deselected.
Your minimal, reproducible example
https://codesandbox.io/s/react-table-8-5-11-grouped-issue-xghfs0?file=/src/main.tsx
Steps to reproduce
a) click select all checkbox
b)
- select all groups manually
- click select all checkbox
c)
- select all groups manually
- de-select 1 row in a group (not a grouped row)
Expected behavior
a) Toggle all selected row should toggle all selected rows b) Toggling all rows should remove all selected columns c) De-selecting one row in a selected group should put all selected rows to intermediate and the group into intermediate
How often does this bug happen?
Every time
Screenshots or Videos

Platform
-OS: MacOS 12.5.1 -Browser: Firefox, Chrome, Safari
react-table version
v8.5.11
TypeScript version
No response
Additional context
Probably related to:
- https://github.com/TanStack/table/issues/4299
- https://github.com/TanStack/table/issues/4298
- https://github.com/TanStack/table/issues/3465
Terms & Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.