Skip to content

Interface: TreeEditorConfig\<TRow\>

Defined in: src/tree-editor/types.ts:62

Configuration for the tree editor.

Type Parameters

TRow

TRow

Properties

createNode?

optional createNode?: (parentId) => TRow

Defined in: src/tree-editor/types.ts:70

Factory for creating new nodes.

Parameters

parentId

string | null

Returns

TRow


enableDrag?

optional enableDrag?: boolean

Defined in: src/tree-editor/types.ts:64

Whether drag-to-reparent is enabled. Default: true.


enableIndent?

optional enableIndent?: boolean

Defined in: src/tree-editor/types.ts:66

Whether keyboard indent/outdent is enabled. Default: true.


generateId?

optional generateId?: () => string

Defined in: src/tree-editor/types.ts:72

Generate a unique ID for new/pasted nodes.

Returns

string


historyDepth?

optional historyDepth?: number

Defined in: src/tree-editor/types.ts:74

Maximum undo history depth. Default: 50.


validateMove?

optional validateMove?: MoveValidator<TRow>

Defined in: src/tree-editor/types.ts:68

Custom move validator.