View as Markdown

API reference: @salmonui/data-grid/engine/tree

TreeSetParentsCommandtype

import type { TreeSetParentsCommand } from '@salmonui/data-grid/engine/tree';
type TreeSetParentsCommand = {
    type: 'tree.setParents';
    parents: {
        [rowId: string]: RowId | null;
    };
};

Parents the data does not carry (row id -> parent id, null: root): row moves of nested (childrenField) or parentIdOf rows dispatch it, since their write cannot change the nesting. Overrides last until disposal.

TreeSetParentsCommand members (2)
NameSignatureDescription
typetype: 'tree.setParents';
parentsparents: { [rowId: string]: RowId | null; };