Skip to content

Tree data

Strata’s defining capability is the indented, multi-level tree grid. This guide covers the two input shapes, the tree column, and expand/collapse behavior.

The two shapes

Input shapeConfig fieldUse when
Nested childrengetChildren(row)Your rows already form a tree, such as JSON imports.
Flat parent idsgetParentId(row)Your rows come from a flat table with parentId.

Strata internally normalizes both shapes to the same row model, so sorting and filtering behave consistently.

The tree column

Mark exactly one column as the tree column with isTreeColumn: true. That column renders indentation and the expand/collapse chevron. Other columns render normally.

Expand and collapse

  • Click the chevron in the tree column to toggle a row.
  • defaultExpanded expands every row on first render.
  • Expansion state is keyed by row id, so stable ids matter.

Examples

Nested data:

Name
Kind
Size

Flat parent-pointer data:

Name
Kind