# previewColumnsCommand (@salmonui/data-grid/engine)

> The previewColumnsCommand function of @salmonui/data-grid/engine: Pure dry run of a columns.* command: the state it would produce, or null when it would be rejected. Renderers use it to report proposed values before the engine commits (controlled columnVisibility and friends).

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

```ts
import { previewColumnsCommand } from '@salmonui/data-grid/engine';
```

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

## Reference

Kind: function

```ts
function previewColumnsCommand<Row>(columns: ColumnSnapshot<Row>, state: ColumnsState, command: ColumnsCommand): ColumnsState | null;
```

Pure dry run of a `columns.*` command: the state it would produce, or null
when it would be rejected. Renderers use it to report proposed values
before the engine commits (controlled `columnVisibility` and friends).
