API REFERENCE
setTreeNodeExpanded
Expands or collapses a tree node by path. Leaf nodes and missing paths cannot be expanded.
What does this API do?
Expands or collapses a tree node by path. Leaf nodes and missing paths cannot be expanded.
API for Pro features: Tree data
Exact input and result types
setTreeNodeExpanded(path: readonly string[], expanded: boolean): Promise<void>| Arguments | Required | Type |
|---|---|---|
| path | Required | readonly string[] |
| expanded | Required | boolean |
The return type is Promise<void>.
Usage flow
After registering and initializing the Grid element, call grid.setTreeNodeExpanded(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.
Feature explanations and examples
- Tree data
Trees display parent-child data, such as folders or organizations, with indentation and expansion controls. Unlike grouping equal values, the parent relationship already exists in the data.