To create a tree row source, use the useTreeDataSource hook exported by LyteNyte Grid.
This hook accepts parameters that configure the tree source view.
Prop
The row data available on the client.
The row data for rows pinned to the bottom of the viewport.
The filter configuration for the client row source.
A function that receives the path of a tree node and its associated data, and returns a unique ID for the row.
An event callback that fires when row data is updated.
A callback invoked whenever a row is expanded or collapsed.
A callback invoked whenever a row is selected or deselected.
A function that receives a row object and returns the entries for its child rows.
The default row group expansion behavior. If a number is provided, row groups with a depth less than or equal to the number are expanded.
The expansion state of tree nodes. Provide this value to control which nodes
are expanded or collapsed.
A function that receives the root data object and returns the entries for the root rows.
The row selection state used by the TreeView component. If not provided, the
TreeView component uses internal selection state. Provide this value to control selection
externally.
Additional row selection IDs to retain even if they do not correspond to rows in the data.
Row IDs that should not be considered selectable.
A custom key that resets row selection when the key changes.
Whether the client row source uses isolated row selection instead of linked selection.
A function that receives the data object for a row and returns the data associated with that row.
The sort configuration for the client row source.
The row data for rows pinned to the top of the viewport.