@spartanfx/react v1.1.0
@spartanfx/react / index / ITreeViewSchema
Interface: ITreeViewSchema<T>
Schema configuration for mapping item fields to tree structure.
Supports both flat (id/parentId) and nested (children) data structures.
Type Parameters
T = any
Properties
| Property | Type | Description |
|---|
childrenField? | string | keyof T | Field name for nested children array. If provided, expects nested structure |
idField? | string | keyof T | Field name for the unique identifier. Defaults to 'id' |
labelField? | string | keyof T | Field name for the display label. Defaults to 'label' |
parentIdField? | string | keyof T | Field name for the parent ID. Defaults to 'parentId' |