Interface TreeRowIf<T>

A row of a tree table: your object (data) plus the tree state. Created by TreeFactory.buildTreeRows.

Example

// expand all first-level rows: change `expanded`, rebuild the displayed rows, repaint
const treeModel = tableModel.getBodyModel() as AreaModelTree<OrderNode>;
for (const row of treeModel.rows) row.expanded = true;
treeModel.recalcVisibleTreeRows(); // without it the table keeps showing the old rows
tableApi.repaintHard();

See

Training: Tree table with checkboxes

Type Parameters

  • T

    the type of your objects

Hierarchy

  • TreeRowIf

Implemented by

Properties

checked: boolean

Checkbox state (with showCheckboxWihoutExtraColumn or a checkbox column).

children: undefined | TreeRowIf<T>[]

The child rows, undefined for leaves.

data: T

Your object. Column values are read from it (columnDef.property).

deep: number

Depth in the tree: 0 = top level.

expanded: boolean

Are the children visible?

keep: boolean

Internal, set by the filter: the row or one of its descendants matches (also below collapsed rows).

parent: undefined | TreeRowIf<T>

The parent row, undefined on the top level.

type?: "" | "TreeRow"

Marker to recognise tree rows across package boundaries (see isTreeRow()).