API REFERENCE
treeNodeToggled
Emitted when tree expansion changes. Inspect the path and expanded state.
What does this API do?
Emitted when tree expansion changes. Inspect the path and expanded state.
API for Pro features: Tree data
Exact input and result types
treeNodeToggled: { path: readonly string[]; expanded: boolean }Usage flow
Subscribe with grid.addEventListener('treeNodeToggled', handler). The result is in event.detail, and event names are case-sensitive. Remove subscriptions when disposing of the view.
const controller = new AbortController();
grid.addEventListener('treeNodeToggled', event => {
console.log(event.detail);
}, { signal: controller.signal });
// On view disposal: controller.abort();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.