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

> The restoreTreeState function of @salmonui/data-grid/engine/tree: Restores a tree part (tree.setExpanded); null without the tree module.

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

```ts
import { restoreTreeState } 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: function

```ts
function restoreTreeState<Row>(engine: DataGridEngine<Row>, part: TreeStatePart): {
    readonly type: string;
    readonly reason: string;
} | null;
```

Restores a tree part (`tree.setExpanded`); null without the tree module.
