WarUI

Tree filtering that keeps ancestors visible

GRID-A17-F07P0baselinePlanned

Filters tree rows while keeping the ancestors of matching rows visible, so every match keeps its context. Optional modes also include the descendants of matches and auto-expand the paths to them. Matching text is highlighted.

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

Live example

A document tree that is collapsed, with an empty quick filter input.

Expected behavior

Typing filters the tree. In ancestors mode, the parents of matches stay visible, styled as context rows. Clearing the filter restores the previous expansion state.

Planned API surface

treeFilterMode ('ancestors' | 'ancestorsAndDescendants' | 'leavesOnly' | 'strict')autoExpandFilteredPathsquickFilterTextisRowFilterMatchonFilterChanged

Acceptance criteria

  • Every matching row's full ancestor chain is visible in the ancestors modes (pending)
  • In strict mode, a child whose parent fails the filter is not shown (pending)
  • Pre-filter expansion state is restored when the filter clears (pending)
  • Context (non-matching) ancestors are visually distinguishable (pending)
  • aria-setsize reflects the visible sibling count after filtering (pending)