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

> The TreeSetExpandedCommand type of @salmonui/data-grid/engine/tree: Controlled expansion: replaces the overrides (and optionally the default).

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

```ts
import type { TreeSetExpandedCommand } 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 TreeSetExpandedCommand = {
    type: 'tree.setExpanded';
    expanded: {
        [rowId: string]: boolean;
    };
    defaultExpanded?: boolean | number;
};
```

Controlled expansion: replaces the overrides (and optionally the default).

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `type: 'tree.setExpanded';` |  |  |
| `expanded` | `expanded: {     [rowId: string]: boolean; };` |  |  |
| `defaultExpanded` | `defaultExpanded?: boolean \| number;` | optional |  |
