Function canMoveTreeRows

  • True if the tree rows can be dropped at the target row: the target is none of the dragged rows and no descendant of them (a node cannot become its own child – no cycle).

    Type Parameters

    • S

    Parameters

    • rows: readonly TreeRowIf<S>[]

      dragged rows

    • targetRow: undefined | TreeRowIf<S>

      the row under the drop marker

    Returns boolean

    false for a cycle

    Example

    const treeModel = tableModel.getBodyModel() as AreaModelTree<OrderNode>;
    const node = treeModel.rows[0];
    canMoveTreeRows([node], node.children?.[0]); // false – into its own child

    Since

    1.1.95