# moveTreeItems (@salmonui/navigation/tree-view)

> The moveTreeItems function of @salmonui/navigation/tree-view: Moves the items ids (taken from data, or from items when they come from another tree) before, after or into the item targetId.

Canonical: https://salmonui.dev/docs/reference/navigation/tree-view/moveTreeItems

```ts
import { moveTreeItems } from '@salmonui/navigation/tree-view';
```

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

## Reference

Kind: function

```ts
function moveTreeItems<T>(data: readonly T[], move: {
    readonly ids: readonly TreeViewKey[];
    readonly targetId: TreeViewKey;
    readonly position: TreeViewDropPosition;
    readonly items?: readonly T[];
}, options: MoveTreeItemsOptions<T>): T[];
```

Moves the items `ids` (taken from `data`, or from `items` when they come
from another tree) `before`, `after` or `into` the item `targetId`.
