Skip to content

Commit

Permalink
Ensure isSubRowSelected returns true when all children aren't selecta…
Browse files Browse the repository at this point in the history
…ble but a grandchild is
  • Loading branch information
Joel 'Aaron' Cohen committed Nov 5, 2024
1 parent 571b23e commit 6255ba8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/table-core/src/features/RowSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,11 @@ export function isSubRowSelected<TData extends RowData>(
const subRowChildrenSelected = isSubRowSelected(subRow, selection, table)
if (subRowChildrenSelected === 'all') {
someSelected = true
someSelectable = true
} else if (subRowChildrenSelected === 'some') {
someSelected = true
allChildrenSelected = false
someSelectable = true
} else {
allChildrenSelected = false
}
Expand Down

0 comments on commit 6255ba8

Please sign in to comment.