Skip to content

Interface: InsertSubtreeOptions\<TRow\>

Defined in: src/tree-editor/commands/insert-subtree.ts:3

Type Parameters

TRow

TRow

Properties

index?

optional index?: number

Defined in: src/tree-editor/commands/insert-subtree.ts:17

Insertion index inside the target parent (appended when omitted).


nodes

nodes: TreeNode<TRow>[]

Defined in: src/tree-editor/commands/insert-subtree.ts:11

Pre-cloned nodes, ordered so that each node appears before its descendants. Their parentId and childIds refer to ids that will be present in the resulting state (i.e., other ids in this batch for non-root nodes). The root’s parentId is ignored — it is overwritten with targetParentId.


rootId

rootId: string

Defined in: src/tree-editor/commands/insert-subtree.ts:13

Id of the subtree root within nodes.


targetParentId

targetParentId: string | null

Defined in: src/tree-editor/commands/insert-subtree.ts:15

New parent for the inserted subtree, or null to add to root.