WarUI

Tree data from a flat parent-id source

GRID-A17-F02P0baselinePlanned

Builds the hierarchy from a flat list in which each record references its parent's id. This shape is typical of SQL tables and REST endpoints. Orphan records and the root parent sentinel value are configurable.

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 flat list of 60 employees with managerId. The CEO's managerId is null.

Expected behavior

The hierarchy is built correctly regardless of input order. An injected orphan appears at the root, is hidden, or raises an onOrphanRows event, depending on orphanHandling.

Planned API surface

treeDatatreeDataMode:'parentId'idFieldparentIdFieldrootParentValueorphanHandlingonOrphanRows

Acceptance criteria

  • The tree output is identical for shuffled and sorted input (pending)
  • Records whose parentId matches rootParentValue become root rows (pending)
  • Each orphanHandling mode behaves as documented (pending)
  • onOrphanRows fires with the list of orphan ids (pending)
  • Building a tree of 10,000 flat rows completes within the documented performance budget (pending)