# PivotSelectionChangeEvent (@salmonui/pivot-table)

> The PivotSelectionChangeEvent interface of @salmonui/pivot-table: onBeforeSelectionChange / onSelectionChange.

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

```ts
import type { PivotSelectionChangeEvent } 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 PivotSelectionChangeEvent extends PivotEvent {
    readonly cells: readonly PivotCellKey[];
    readonly keys: readonly string[];
}
```

`onBeforeSelectionChange` / `onSelectionChange`.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `cells` | `readonly cells: readonly PivotCellKey[];` |  |  |
| `keys` | `readonly keys: readonly string[];` |  | `rowKey\|columnKey` strings. |
| `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). |
