table icon indicating copy to clipboard operation
table copied to clipboard

fix(selection): update logic to fix selection of disabled rows

Open simcha90 opened this issue 1 year ago • 0 comments

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:

  1. 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
  1. 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
  1. 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

simcha90 avatar Mar 10 '24 08:03 simcha90