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

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

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

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

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

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 FocusState {
    readonly target: FocusTarget | null;
    readonly mode: 'navigate' | 'edit';
    readonly direction: 'ltr' | 'rtl';
    readonly lastCell: {
        readonly rowId: RowId;
        readonly columnId: ColumnId;
    } | null;
    readonly intent: FocusIntent | null;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `target` | `readonly target: FocusTarget \| null;` |  |  |
| `mode` | `readonly mode: 'navigate' \| 'edit';` |  |  |
| `direction` | `readonly direction: 'ltr' \| 'rtl';` |  | Resolved text direction (the `direction` option, or what the renderer detected from `dir`). |
| `lastCell` | `readonly lastCell: {     readonly rowId: RowId;     readonly columnId: ColumnId; } \| null;` |  | Last body cell, so moving back from the header returns to it. |
| `intent` | `readonly intent: FocusIntent \| null;` |  | Span-aware moves: the column a vertical move aimed at, or the row a horizontal move aimed at, when it landed on a span anchor elsewhere. The next move in the same axis continues from it, so moving down through a column span returns to the original column. Null otherwise. |
