WarUI

Filtering tree data

GRID-A10-F25P1baselinePlanned

Defines filtering for hierarchical rows. Ancestors of matching rows are kept so that the context is visible, matching parents can optionally show all their descendants, and auto-expand reveals matches. This avoids orphaned results and invisible hits.

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

Live example

A file-system tree, 5 levels deep with 3,000 nodes. Quick search is set to 'invoice'.

Expected behavior

In keepAncestors mode, matching files appear with their parent folders, and the ancestors are styled as context. includeDescendants shows the whole subtree when a folder matches. Clearing the filter restores the previous expansion state.

Planned API surface

treeDatatreeFilterMode ('keepAncestors' | 'leafOnly' | 'includeDescendants')autoExpandOnFilterrestoreExpansionOnClearisRowFilterMatch(rowId)

Acceptance criteria

  • keepAncestors displays every matching node together with all of its ancestors and no unrelated siblings. (pending)
  • includeDescendants also shows all descendants of each matching node. (pending)
  • leafOnly evaluates only leaf nodes, and their ancestors are displayed as context. (pending)
  • autoExpandOnFilter expands the ancestors of matches; restoreExpansionOnClear restores the expansion state from before filtering. (pending)
  • isRowFilterMatch distinguishes nodes that actually match from ancestors shown only as context. (pending)