WarUI

Hierarchical selection for grouped and tree rows

GRID-A11-F24P2baselinePlanned

Selecting a group or parent row can cascade to its descendants. Parents show an indeterminate state when only some children are selected. The arrow keys expand and collapse nodes in tree mode. This is needed for folder-like or grouped data sets.

Planned. This page shows the specification from issue #189. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A task grid grouped by team, with collapsible groups and the checkbox column.

Expected behavior

With cascade, checking a group checks all of its descendants, including collapsed ones. Partially selected groups show an indeterminate checkbox. ArrowRight expands a focused group, and ArrowLeft collapses it or moves to the parent.

Planned API surface

groupSelectionMode: 'cascade' | 'independent' | 'leavesOnly'getRowSelectionState(key)treeKeyboard: booleanonGroupSelectionChange

Acceptance criteria

  • In cascade mode, selecting a parent selects all selectable descendants. (pending)
  • A parent's checkbox is checked when all selectable descendants are selected, mixed when some are, and unchecked when none are. (pending)
  • In leavesOnly mode, group rows are not stored in selectedRowKeys. (pending)
  • ArrowRight on a collapsed node expands it; on an expanded node it moves to the first child. (pending)
  • ArrowLeft on an expanded node collapses it; on a child it moves to the parent. (pending)