# TreeSetParentsCommand (@salmonui/data-grid/engine/tree)

> The TreeSetParentsCommand type of @salmonui/data-grid/engine/tree: 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.

Canonical: https://salmonui.dev/docs/reference/data-grid/engine-tree/TreeSetParentsCommand

```ts
import type { TreeSetParentsCommand } from '@salmonui/data-grid/engine/tree';
```

Entry index: https://salmonui.dev/docs/reference/data-grid/engine-tree (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine-tree.md).

## Reference

Kind: type

```ts
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.

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `type: 'tree.setParents';` |  |  |
| `parents` | `parents: {     [rowId: string]: RowId \| null; };` |  |  |
