# PivotCellClickEvent (@salmonui/pivot-table)

> The PivotCellClickEvent interface of @salmonui/pivot-table: onCellClick.

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

```ts
import type { PivotCellClickEvent } 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 PivotCellClickEvent extends PivotEvent {
    readonly cell: PivotCell | null;
    readonly rowHeader: PivotHeaderNode;
    readonly rowKey: string;
    readonly columnKey: string | null;
    readonly element: HTMLElement;
    readonly nativeEvent: MouseEvent;
}
```

`onCellClick`.

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `cell` | `readonly cell: PivotCell \| null;` |  | Value cell, or null for a row header cell. |
| `rowHeader` | `readonly rowHeader: PivotHeaderNode;` |  | Row header of the clicked row. |
| `rowKey` | `readonly rowKey: string;` |  |  |
| `columnKey` | `readonly columnKey: string \| null;` |  |  |
| `element` | `readonly element: HTMLElement;` |  |  |
| `nativeEvent` | `readonly nativeEvent: MouseEvent;` |  |  |
| `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). |
