WarUI

Selection and expansion state

GRID-A21-F06P0baselinePlanned

Persists row selection, cell range selection, and the expansion of groups, tree nodes and master-detail rows, all keyed by stable row ids or group keys rather than by visual index. A select-all state is stored as a mode plus exceptions so that it scales to large or server-side datasets.

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

Live example

A tree-structured grid of 5,000 rows with checkbox selection, master-detail rows and grouping.

Expected behavior

With select-all active and 3 rows deselected, the selection slice stores {mode:'all', except:[3 ids]} rather than 4,997 ids. Group and tree expansion is stored as a list of group key paths. All of it restores exactly.

Planned API surface

getState().selectiongetState().expansionsetState({selection, expansion})getRowIdgetGroupKeyonSelectionChangeonExpansionChange

Acceptance criteria

  • Selection is stored as either {mode:'some', ids:[...]} or {mode:'all', except:[...]}. (pending)
  • Cell ranges are stored as start and end pairs of row id and column id, and are included only when persistRanges is true. (pending)
  • Expansion is stored as group key paths that remain stable across sorting and filtering. (pending)
  • Ids that no longer exist in the data are ignored on restore and counted in the restore report. (pending)
  • Restoring expansion in a lazily loaded tree triggers child loading in breadth-first order. (pending)