table
table copied to clipboard
fix(selection): update logic to fix selection of disabled rows
Fix issue:
https://github.com/TanStack/table/issues/5398
We updated logic for selection of disabled rows (at least for pagination).
Here next possible flows:
- One row disabled and selected then click on Footer checkbox:
- if all other rows selected - Footer checkbox: SELECTED
- if all other rows unselected - Footer checkbox: INDETERMINATE
- One row disabled and unselected then click on Footer checkbox:
- if all other rows selected - Footer checkbox: INDETERMINATE
- if all other rows unselected - Footer checkbox: UNSELECTED
- One row disabled and selected and One row disabled and unselected then click on Footer checkbox:
- if all other rows selected - Footer checkbox: INDETERMINATE
- if all other rows unselected - Footer checkbox: INDETERMINATE
Status of all enabled checkboxes always will be toggled, but sign inside Footer checkbox will show real state of all checkboxes
P.S. Also getToggleAllRowsSelectedHandler respect disabled checkboxes