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

> The SelectionState interface of @salmonui/data-grid/engine.

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

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

Also exported from `@salmonui/data-grid/engine/selection`.

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: interface

```ts
interface SelectionState {
    readonly options: ResolvedSelectionOptions;
    readonly version: number;
    readonly rows: RowSelection;
    readonly cells: {
        readonly anchor: CellKey | null;
        readonly ranges: readonly CellRange[];
    };
    readonly columns: readonly ColumnId[];
    readonly change: SelectionChange;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `options` | `readonly options: ResolvedSelectionOptions;` |  |  |
| `version` | `readonly version: number;` |  |  |
| `rows` | `readonly rows: RowSelection;` |  |  |
| `cells` | `readonly cells: {     readonly anchor: CellKey \| null;     readonly ranges: readonly CellRange[]; };` |  |  |
| `columns` | `readonly columns: readonly ColumnId[];` |  |  |
| `change` | `readonly change: SelectionChange;` |  | What the last command changed (membership flips of `rows.ids`). |
