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

> The FocusMethods type of @salmonui/data-grid/engine.

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

```ts
import type { FocusMethods } 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: type

```ts
type FocusMethods<Row> = {
    getTarget(ctx: ModuleContext<Row>): FocusTarget | null;
    resolveMove(ctx: ModuleContext<Row>, direction: FocusDirection, pageSize?: number): FocusTarget | null;
    getDefaultTarget(ctx: ModuleContext<Row>): FocusTarget | null;
};
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `getTarget` | `getTarget(ctx: ModuleContext<Row>): FocusTarget \| null;` |  | Current logical target (null before anything was focused). |
| `resolveMove` | `resolveMove(ctx: ModuleContext<Row>, direction: FocusDirection, pageSize?: number): FocusTarget \| null;` |  | Where `focus.move` would go, without moving (keyboard handlers, previews). |
| `getDefaultTarget` | `getDefaultTarget(ctx: ModuleContext<Row>): FocusTarget \| null;` |  | First body cell, or the first header cell when there are no rows. |
