table icon indicating copy to clipboard operation
table copied to clipboard

Fix issue toggling row selection for a grouped row

Open mollykreis opened this issue 2 years ago • 2 comments

Resolves #4759

Toggling a grouped row can have up to two effects:

  1. Update the selected state of the grouped row if that grouped row supports selection
  2. Update the selected state of subrows if getCanSelectSubRows is true

toggleSelected() returned early if the selected state of the row wasn't going to change without any consideration of whether the selected state of subrows also needed to be updated. With this change, toggleSelected() now considers both if the rows selection state will change and if subrow selection state might change before returning early.

I've added some selection tests to table-core -- both a few basic tests and some tests that cover the issue I am fixing.

mollykreis avatar Mar 17 '23 20:03 mollykreis

@mollykreis is attempting to deploy a commit to the Tanstack Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 17 '23 20:03 vercel[bot]

Unsure if this change is needed as discussed here: https://github.com/TanStack/table/issues/4759#issuecomment-1483985451

KevinVandy avatar Mar 26 '23 03:03 KevinVandy