Function: validateCycleAndSelf()
validateCycleAndSelf<
TRow>(sourceId,targetId,_position,state):MoveValidationResult
Defined in: src/tree-editor/validators.ts:35
Built-in move validator. Rejects self-moves and moves that would create a cycle (moving a node onto one of its own descendants).
sourceIdis the node being moved.targetIdis the drop target (ornullto move to root).positionis'child' | 'before' | 'after'(informational here — the cycle/self checks apply regardless of position).
Type Parameters
TRow
TRow
Parameters
sourceId
string
targetId
string | null
_position
"child" | "before" | "after"
state
TreeState<TRow>