Skip to content

Interface: TreeDataConfig\<TRow\>

Defined in: src/model/types.ts:170

Configures tree (hierarchical / BOM) mode. Passing treeData to <DataGrid> turns it into a tree grid.

Provide either getChildren (nested data) or getParentId (flat, parent-pointer data). If both are given, getChildren wins and a development warning is emitted.

Type Parameters

TRow

TRow

Properties

getChildren?

optional getChildren?: (row) => TRow[] | undefined

Defined in: src/model/types.ts:174

Nested data: returns a row’s children, or undefined for a leaf.

Parameters

row

TRow

Returns

TRow[] | undefined


getParentId?

optional getParentId?: (row) => string | null | undefined

Defined in: src/model/types.ts:178

Flat data: returns a row’s parent id, or null/undefined for a root.

Parameters

row

TRow

Returns

string | null | undefined


getRowId

getRowId: (row) => string

Defined in: src/model/types.ts:172

Returns a stable, unique id for a row.

Parameters

row

TRow

Returns

string