WarUI

Selection preserved across filtering and sorting

GRID-A11-F20P1baselinePlanned

Selected rows stay selected when they are hidden by a filter or reordered by a sort. A policy decides whether hidden selected rows still count for bulk actions. The UI tells the user when some selected rows are hidden, so they are not surprised by actions on rows they cannot see.

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 product grid with 10 selected rows across categories, a category filter and a sort control.

Expected behavior

Applying the filter shows a notice: '6 selected rows are hidden by filters'. Sorting keeps the selection on the same rows (by key). With clearOnFilter, applying a filter clears the hidden selected rows.

Planned API surface

hiddenSelectionPolicy: 'keep' | 'clearOnFilter' | 'excludeFromActions'getSelectedKeys({visibleOnly})onHiddenSelectionChange

Acceptance criteria

  • Sorting never changes which keys are selected. (pending)
  • With 'keep', hidden selected rows remain in getSelectedKeys(), and getSelectedKeys({visibleOnly:true}) excludes them. (pending)
  • With 'clearOnFilter', hidden selected rows are removed and an event with source='filter' is fired. (pending)
  • The notice shows the hidden count and offers 'Clear hidden' and 'Show all' actions. (pending)
  • The anchor for range selection is reset if the anchor row becomes hidden. (pending)