Toggle select all rows doesn't respect `canSelect()` condition
TanStack Table version
8.13.2
Framework/Library version
17.0.2
Describe the bug and the steps to reproduce it
-
When you click unselect all rows it unselect even disabled rows (that was set for
enableRowSelection) -
Second issue that it shows that all rows selected checkbox as checked (but should show indeterminate state) even if disabled row is not selected:
But when disabled row selected and other rows - not selected, it shows correctly indeterminate checkbox
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
(Please use Footer Checkbox for demonstration)
https://codesandbox.io/p/devbox/loving-voice-7sqqp7?file=%2Fsrc%2Fmain.tsx%3A109%2C13
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
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.
I am also facing the same issue.
@simcha90 - You may want to update the rowSelection state type to remove the eslint error showing on your codesandbox link.
const [rowSelection, setRowSelection] = React.useState<RowSelectionState>({0: true})