Demo / Plugins / Pro / Tree Data
@omnigrid/tree-data-pluginFlat parent IDs
TreeDataPlugin builds a hierarchy from a flat array. Each record has a unique id and a parentId that points to its parent; root records omit parentId. Configure getParentId to resolve the relationship, and use the same stable IDs for getRowId and parentId.
Expand or collapse branches, inspect each asset's role, sector, clearance, contracts, risk, and status note, or use the toolbar to expand or collapse the syndicate hierarchy. Switch between leaf-only checkboxes and tri-state node selection to select an entire branch.
Nested children arrays
Each nested node contains a children array of child nodes; only the root records are passed to the grid. Configure childrenField: "children" (or a getChildren accessor) instead of getParentId. Every node still needs a stable ID from getRowId.
This example uses the syndicate dataset and sets defaultExpandedLevel: 1. Levels start at 0, so root groups expand initially while deeper groups remain collapsed.