# PivotFieldMoveEvent (@salmonui/pivot-table)

> The PivotFieldMoveEvent interface of @salmonui/pivot-table: onBeforeFieldMove / onFieldMove.

Canonical: https://salmonui.dev/docs/reference/pivot-table/PivotFieldMoveEvent

```ts
import type { PivotFieldMoveEvent } from '@salmonui/pivot-table';
```

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

## Reference

Kind: interface

```ts
interface PivotFieldMoveEvent extends PivotEvent {
    readonly field: string;
    readonly from: PivotAxis | null;
    readonly to: PivotAxis | null;
    readonly index: number;
}
```

`onBeforeFieldMove` / `onFieldMove`.

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `from` | `readonly from: PivotAxis \| null;` |  |  |
| `to` | `readonly to: PivotAxis \| null;` |  | Null removes the field from the report. |
| `index` | `readonly index: number;` |  |  |
| `type` | `type: string;` | inherited | `'sortChange'`, `'beforeSortChange'`, ... |
| `source` | `source: DataGridEventSource;` | inherited |  |
| `defaultPrevented` | `defaultPrevented: boolean;` | inherited | True after `preventDefault()` (before-events and click events). |
| `preventDefault` | `preventDefault: () => void;` | inherited | Before-events and click events: cancels the action (or the built-in behavior). |
