# @salmonui/data-grid API reference

> 271 exported symbols of @salmonui/data-grid: 21 components, 10 functions, 182 interfaces, 52 types and 6 constants.

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

```ts
import { … } from '@salmonui/data-grid';
```

## Components

### DataGrid

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGrid

```ts
function DataGrid<Row>(props: DataGridProps<Row>): import("react").JSX.Element;
```

Virtualized data grid (React 19). One scroll container, one `role="grid"`
tree, sticky header, frozen columns outside horizontal virtualization.
DataGrid state lives in the `@salmonui/data-grid/engine` engine; scroll and drag
transients live in a renderer-local layout store and the DOM.

Render features: the features the initial props need
are computed once. When none is needed, or the `features` prop provides
every needed one, the view renders directly with them. Otherwise a gate
reads them from the registry (`#data-grid-features`); the grid has no
Suspense boundary of its own. The server registry answers synchronously,
so the server markup is the plain grid in every SSR mode. While
hydrating, a gate whose chunk has not arrived throws the pending load to
the nearest ancestor boundary (or the root), which keeps the server HTML
and hydrates when the chunk arrives. On a client-only first use the
placeholder shows for one chunk round trip.

Props: [`DataGridProps`](https://salmonui.dev/docs/reference/data-grid/DataGridProps) (its members are the props)

### DataGridAggregate

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAggregate

```ts
function DataGridAggregate<Row = unknown>(_props: DataGridAggregateProps<Row>): null;

interface DataGridAggregate<Row = unknown> extends DataGridAggregateProps<Row> {
}
```

JSX aggregate.
One aggregate of an aggregate row.

### DataGridAggregateRow

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAggregateRow

```ts
function DataGridAggregateRow(_props: {
    readonly children?: ReactNode;
}): null;

interface DataGridAggregateRow<Row = unknown> extends DataGridAggregateRowProps<Row> {
}
```

JSX aggregate row; its `<DataGridAggregate>` children are the aggregates.
One aggregate row of the `aggregates` prop.

### DataGridCell

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCell

```ts
const DataGridCell: <Row>(props: DataGridCellProps<Row>) => ReactNode;
```

Body cell part. Subscribes to its own engine cell channel only, so a change
to one cell re-renders one cell. `memo` (instead of compiler-derived
memoization, the package is not compiled yet) keeps retained cells from
re-rendering when a row re-renders for a column-window change.

Props: [`DataGridCellProps`](https://salmonui.dev/docs/reference/data-grid/DataGridCellProps) (its members are the props)

### DataGridColumn

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumn

```ts
function DataGridColumn<Row = unknown>(_props: DataGridColumnProps<Row> & {
    readonly children?: ReactNode;
}): null;

interface DataGridColumn<Row = unknown> extends DataGridColumnProps<Row> {
}
```

JSX column. Renders nothing; nested `<DataGridColumn>` children form a stacked header.
A column definition: the props of `<DataGridColumn>` and the items of the `columns` prop.

### DataGridDefaultCell

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDefaultCell

```ts
function DataGridDefaultCell<Row = unknown>({ column, value, formattedValue }: DataGridDefaultCellProps<Row>): import("react").JSX.Element;
```

Default cell content: formatted text, or a read-only checkbox for `displayAsCheckbox` columns.

Props: [`DataGridDefaultCellProps`](https://salmonui.dev/docs/reference/data-grid/DataGridDefaultCellProps) (its members are the props)

### DataGridDefaultPager

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDefaultPager

```ts
const DataGridDefaultPager: import("react").MemoExoticComponent<typeof DataGridDefaultPagerImpl>;
```

### DataGridDetailRow

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDetailRow

```ts
const DataGridDetailRow: import("react").MemoExoticComponent<typeof DataGridDetailRowImpl>;
```

Detail row keyed by its `__detail:<rowId>` id. Re-renders when its parent
row object, its async load state, or the detail render props change.

### DataGridDetailToggle

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDetailToggle

```ts
const DataGridDetailToggle: import("react").MemoExoticComponent<typeof DataGridDetailToggleImpl>;
```

Expand/collapse button of the detail column; re-renders only when its row's expansion changes.

### DataGridFooter

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFooter

```ts
const DataGridFooter: import("react").MemoExoticComponent<typeof DataGridFooterImpl>;
```

Sticky grid footer with the footer aggregate rows.

### DataGridGroupCaptionRow

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridGroupCaptionRow

```ts
const DataGridGroupCaptionRow: import("react").MemoExoticComponent<typeof DataGridGroupCaptionRowImpl>;
```

Group caption row (`role="row"` with one spanning `gridcell`).

### DataGridGroupFooterRow

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridGroupFooterRow

```ts
const DataGridGroupFooterRow: import("react").MemoExoticComponent<typeof DataGridGroupFooterRowImpl>;
```

Group footer row (group-level aggregates).

### DataGridGroupIndent

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridGroupIndent

```ts
function DataGridGroupIndent({ levels }: {
    levels: number;
}): import("react").JSX.Element | null;
```

Frozen group indent block (`levels` x indent width); presentational, outside the accessibility tree.

### DataGridGroupPanel

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridGroupPanel

```ts
const DataGridGroupPanel: import("react").MemoExoticComponent<typeof DataGridGroupPanelImpl>;
```

Group drop area and chips.

### DataGridIconsProvider

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridIconsProvider

```ts
function DataGridIconsProvider(props: {
    readonly icons: DataGridIcons | undefined;
    readonly children?: ReactNode;
}): ReactNode;
```

Supplies icon overrides to every `DataGrid` below it (for example one icon set
for an application). Nested providers and a grid's `icons` prop merge over
the outer ones, key by key.

### DataGridOutputStatus

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridOutputStatus

```ts
function DataGridOutputStatus(): import("react").JSX.Element | null;
```

Export and print busy indicator: a spinner overlay with a polite
status while a file or the print document is produced. Renders nothing
(and never on the server) when idle.

### DataGridPager

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPager

```ts
const DataGridPager: import("react").MemoExoticComponent<typeof DataGridPagerImpl>;
```

### DataGridRow

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRow

```ts
function DataGridRow({ className, children, ...rest }: DataGridRowProps): import("react").JSX.Element;
```

`role="row"` part for row templates: spread `rowProps` and place `cells` inside.

Props: [`DataGridRowProps`](https://salmonui.dev/docs/reference/data-grid/DataGridRowProps) (its members are the props)

### DataGridSearchBox

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSearchBox

```ts
function DataGridSearchBox<Row = unknown>(props: DataGridSearchBoxProps<Row>): import("react").JSX.Element;
```

Props: [`DataGridSearchBoxProps`](https://salmonui.dev/docs/reference/data-grid/DataGridSearchBoxProps) (its members are the props)

### DataGridToolbar

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridToolbar

```ts
const DataGridToolbar: import("react").MemoExoticComponent<typeof DataGridToolbarImpl>;
```

Toolbar part (`toolbar` prop).

### DataGridTreeToggle

Kind: component

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeToggle

```ts
const DataGridTreeToggle: import("react").MemoExoticComponent<typeof DataGridTreeToggleImpl>;
```

Tree toggle part (also for `renderRow` templates).

## Functions

### defineChildGrid

Kind: function

Page: https://salmonui.dev/docs/reference/data-grid/defineChildGrid

```ts
function defineChildGrid<Child, Parent = unknown>(config: DataGridChildGrid<Child, Parent>): DataGridChildGrid<unknown, Parent>;
```

Types a `childGrid` by its child row type (identity at runtime). The
`childGrid` prop holds child grids of any row type, so its child rows are
`unknown`; this helper checks the config against `Child` and `Parent`.

### downloadBlob

Kind: function

Page: https://salmonui.dev/docs/reference/data-grid/downloadBlob

```ts
function downloadBlob(data: Blob | ExportFile<Uint8Array | string>, fileName?: string, doc?: Document | undefined): boolean;
```

Saves a `Blob` or an export file through a temporary object URL. Returns
false outside a browser (SSR, workers without a document), so it is safe
to call anywhere.

### useDataGridApi

Kind: function

Page: https://salmonui.dev/docs/reference/data-grid/useDataGridApi

```ts
function useDataGridApi<Row = unknown>(): DataGridApi<Row>;
```

The imperative API of the enclosing `DataGrid`, for slots and descendants.

## Interfaces

### DataGridAdaptive

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAdaptive

```ts
interface DataGridAdaptive {
    readonly target?: DataGridAdaptiveTarget;
    readonly rowLayout?: DataGridAdaptiveRowLayout;
    readonly breakpoint?: number;
    readonly defaultActive?: boolean;
}
```

`adaptive` prop object form.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `target` | `readonly target?: DataGridAdaptiveTarget;` | optional | `both` (default): adaptive at every width. `mobile`: only while the grid is narrower than `breakpoint`. `desktop`: only while it is at least `breakpoint` wide. Width is the grid's own container width (a container query), not the device or the window. |
| `rowLayout` | `readonly rowLayout?: DataGridAdaptiveRowLayout;` | optional | `vertical` renders each record as a stacked card of label/value fields. Default `horizontal`. |
| `breakpoint` | `readonly breakpoint?: number;` | optional | Container width in CSS px that separates `mobile` from `desktop`. Default 640. *Salmon* |
| `defaultActive` | `readonly defaultActive?: boolean;` | optional | Mode used for server rendering and hydration, before the container is measured (`mobile` / `desktop` targets). Default: false. Set it from a user-agent hint to avoid a desktop-to-adaptive switch after mount. *Salmon* |

### DataGridAdaptiveApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAdaptiveApi

```ts
interface DataGridAdaptiveApi {
    openSortDialog(): void;
    openFilterDialog(field?: string): void;
    isAdaptive(): boolean;
}
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `openSortDialog` | `openSortDialog(): void;` |  | Opens the sort sheet (`showAdaptiveSortDialog`). |
| `openFilterDialog` | `openFilterDialog(field?: string): void;` |  | Opens the filter sheet of `field`, or the list of filterable columns (`showAdaptiveFilterDialog`). |
| `isAdaptive` | `isAdaptive(): boolean;` |  | True while the adaptive layout applies (derived from the measured container width). *Salmon* |

### DataGridAdaptiveDialogOpenEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAdaptiveDialogOpenEvent

```ts
interface DataGridAdaptiveDialogOpenEvent extends DataGridEvent {
    readonly kind: DataGridAdaptiveDialogKind;
    readonly field: string | undefined;
}
```

`onBeforeAdaptiveDialogOpen` (`beforeOpenAdaptiveDialog`); `preventDefault()` keeps it closed.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `kind` | `readonly kind: DataGridAdaptiveDialogKind;` |  |  |
| `field` | `readonly field: string \| undefined;` |  | Filter dialog for one column; undefined opens the column list. |
| `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). |

### DataGridAdaptiveProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAdaptiveProps

```ts
interface DataGridAdaptiveProps {
    adaptive?: boolean | DataGridAdaptive;
    onBeforeAdaptiveDialogOpen?: (event: DataGridAdaptiveDialogOpenEvent) => void;
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `adaptive` | `adaptive?: boolean \| DataGridAdaptive;` | optional | Adaptive UI (`enableAdaptiveUI`, `adaptiveUIMode`, `rowRenderingMode`): full-screen sheets for menus and dialogs, 44 px touch targets, touch long-press, and optional vertical (card) rows. `true` is `{ target: 'both' }`. |
| `onBeforeAdaptiveDialogOpen` | `onBeforeAdaptiveDialogOpen?: (event: DataGridAdaptiveDialogOpenEvent) => void;` | optional |  |

### DataGridAddEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAddEvent

```ts
interface DataGridAddEvent<Row> extends DataGridEvent {
    readonly row: Readonly<Record<string, unknown>> | undefined;
    readonly position: 'top' | 'bottom';
    readonly rowId: RowId | null;
    readonly isNew: true;
    readonly _row?: Row;
}
```

`onBeforeAdd` / `onAdd`.

Members (9):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `row` | `readonly row: Readonly<Record<string, unknown>> \| undefined;` |  | Initial values passed to `addRow` (by column id). |
| `position` | `readonly position: 'top' \| 'bottom';` |  |  |
| `rowId` | `readonly rowId: RowId \| null;` |  | Temporary id of the added row (after-event only). |
| `isNew` | `readonly isNew: true;` |  |  |
| `_row` | `readonly _row?: Row;` | optional | Type witness. |
| `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). |

### DataGridAfterPrintEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAfterPrintEvent

```ts
interface DataGridAfterPrintEvent extends DataGridEvent {
    readonly scope: 'all' | 'page';
    readonly hierarchy: ExportHierarchyMode;
}
```

After printing: the window's `afterprint` after a `print()`.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `scope` | `readonly scope: 'all' \| 'page';` |  |  |
| `hierarchy` | `readonly hierarchy: ExportHierarchyMode;` |  |  |
| `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). |

### DataGridAggregateContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAggregateContext

```ts
interface DataGridAggregateContext<Row> {
    readonly field: string;
    readonly column: DataGridColumnInfo<Row> | undefined;
    readonly values: Readonly<Record<string, unknown>>;
    readonly formatted: Readonly<Record<string, string>>;
    readonly group: GroupRowSnapshot | null;
    readonly key: GroupRowSnapshot['key'] | null;
    readonly count: number;
    readonly aggregates: AggregateValues;
    readonly rows: () => readonly Row[];
}
```

Context of aggregate templates (`renderFooter`, `renderGroupFooter`, `renderGroupCaption`).

Members (9):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row> \| undefined;` |  |  |
| `values` | `readonly values: Readonly<Record<string, unknown>>;` |  | Values of this column's aggregates by type (`{ sum, average }`). |
| `formatted` | `readonly formatted: Readonly<Record<string, string>>;` |  | Formatted values by type. |
| `group` | `readonly group: GroupRowSnapshot \| null;` |  | The group for group footers and captions; null in the grid footer. |
| `key` | `readonly key: GroupRowSnapshot['key'] \| null;` |  | `key` and `count` of the group. In the grid footer: null and the data rows the values cover (the page for `aggregateScope: 'page'`, every matching row for `'all'` or server aggregates). |
| `count` | `readonly count: number;` |  |  |
| `aggregates` | `readonly aggregates: AggregateValues;` |  | Every aggregate of the group or grid. |
| `rows` | `readonly rows: () => readonly Row[];` |  |  |

### DataGridApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridApi

```ts
interface DataGridApi<Row = unknown> extends Omit<CoreDataGridApi<Row>, 'engine' | 'getRowInfo' | keyof DataGridQueryApi>, DataGridSelectionApi<Row>, DataGridChromeApi, DataGridQueryApi, DataGridStateMethods, DataGridEditApi<Row>, DataGridOutputApi<Row>, DataGridAdaptiveApi, DataGridDetailApi, DataGridRowPinningApi, DataGridDataUiApi, DataGridFilterBuilderApi, DataGridViewApi, DataGridTreeApi<Row> {
    readonly engine: DataGridApiEngine<Row>;
    readonly element: HTMLDivElement | null;
    focus(): void;
    focusCell(rowId: RowId, field: string): void;
    focusHeader(field: string): void;
    getFocusedCell(): DataGridFocusedCell | null;
    registerKeyHandler(command: string, handler: DataGridKeyHandler, options?: {
        priority?: number;
    }): () => void;
    getRowInfo(target: RowId | Element | EventTarget | null): DataGridRowInfo<Row> | undefined;
    getRowElement(rowId: RowId): HTMLElement | null;
    getCellElement(rowId: RowId, field: string): HTMLElement | null;
    scrollToRow(rowId: RowId, options?: DataGridScrollOptions): void;
    scrollToColumn(field: string, options?: DataGridScrollOptions): void;
    autoSizeColumns(fields?: string | readonly string[]): void;
    setColumnWidth(field: string, width: number): DataGridActionResult;
    moveColumn(field: string, toIndex: number): DataGridActionResult;
    getRenderedRange(): {
        readonly rows: VirtualRange;
        readonly columns: VirtualRange;
    };
}
```

Imperative `DataGrid` API (`ref`, `useDataGridApi()`).

Members (143):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `engine` | `readonly engine: DataGridApiEngine<Row>;` |  | The engine, with the façades of the optional modules a prop registers (`infiniteScroll`). |
| `element` | `readonly element: HTMLDivElement \| null;` |  | The root element; null before mount and after unmount. |
| `focus` | `focus(): void;` |  | Focuses the grid content: the focused body cell, else the last focused body cell, else the first body cell (also from the header, like Alt+W). |
| `focusCell` | `focusCell(rowId: RowId, field: string): void;` |  | Scrolls the cell into view and focuses it. |
| `focusHeader` | `focusHeader(field: string): void;` |  |  |
| `getFocusedCell` | `getFocusedCell(): DataGridFocusedCell \| null;` |  |  |
| `registerKeyHandler` | `registerKeyHandler(command: string, handler: DataGridKeyHandler, options?: {     priority?: number; }): () => void;` |  | Registers a handler for a keyboard command (`DEFAULT_KEY_BINDINGS`); higher priority runs first. Returns the unregister function. |
| `getRowInfo` | `getRowInfo(target: RowId \| Element \| EventTarget \| null): DataGridRowInfo<Row> \| undefined;` |  | Row info by row id, or by any element inside a row (cell, custom template content). |
| `getRowElement` | `getRowElement(rowId: RowId): HTMLElement \| null;` |  |  |
| `getCellElement` | `getCellElement(rowId: RowId, field: string): HTMLElement \| null;` |  |  |
| `scrollToRow` | `scrollToRow(rowId: RowId, options?: DataGridScrollOptions): void;` |  |  |
| `scrollToColumn` | `scrollToColumn(field: string, options?: DataGridScrollOptions): void;` |  |  |
| `autoSizeColumns` | `autoSizeColumns(fields?: string \| readonly string[]): void;` |  | Fits widths to header and rendered content; every visible column when omitted. |
| `setColumnWidth` | `setColumnWidth(field: string, width: number): DataGridActionResult;` |  |  |
| `moveColumn` | `moveColumn(field: string, toIndex: number): DataGridActionResult;` |  |  |
| `getRenderedRange` | `getRenderedRange(): {     readonly rows: VirtualRange;     readonly columns: VirtualRange; };` |  | Rendered row range and center column range (overscan included). |
| `getColumn` | `getColumn: (fieldOrId: string) => CompiledColumn<Row> \| undefined;` | inherited | Leaf column by column id, else the first leaf with that `field`. |
| `getColumns` | `getColumns: () => readonly CompiledColumn<Row>[];` | inherited | Every leaf column in definition order, including hidden ones. |
| `getVisibleColumns` | `getVisibleColumns: () => readonly CompiledColumn<Row>[];` | inherited | Visible leaves in runtime order. |
| `getHiddenColumns` | `getHiddenColumns: () => readonly CompiledColumn<Row>[];` | inherited | Leaves hidden at runtime, in definition order. |
| `getColumnAt` | `getColumnAt: (index: number) => CompiledColumn<Row> \| undefined;` | inherited | Visible leaf at an index of `getVisibleColumns()`. |
| `getColumnIndex` | `getColumnIndex: (fieldOrId: string) => number;` | inherited | Index of a column in `getVisibleColumns()`, or -1. |
| `showColumns` | `showColumns: (fieldsOrIds: string \| readonly string[]) => CommandResult;` | inherited |  |
| `hideColumns` | `hideColumns: (fieldsOrIds: string \| readonly string[]) => CommandResult;` | inherited |  |
| `getViewRows` | `getViewRows: () => readonly Row[];` | inherited | Rows of the current view (after the query pipeline), as raw references. |
| `getFilteredRows` | `getFilteredRows: () => readonly Row[];` | inherited | Rows passing search and every filter, in sort order, across every page, as raw references. Without the `filter` module, every row. |
| `getRow` | `getRow: (rowId: string) => Row \| undefined;` | inherited |  |
| `getRowIndex` | `getRowIndex: (rowId: string) => number;` | inherited | Visible index of a row, or -1. |
| `getRowIdAt` | `getRowIdAt: (index: number) => string \| undefined;` | inherited | Row id at a visible index (the inverse of `getRowIndex`), or undefined. |
| `getCell` | `getCell: (rowId: string, field: string) => CellSnapshot \| undefined;` | inherited |  |
| `getDataSource` | `getDataSource: () => DataSource<Row>;` | inherited |  |
| `getPrimaryKeyFields` | `getPrimaryKeyFields: () => readonly string[];` | inherited | `field` of each `primaryKey` leaf column, in column order. |
| `getColumnFacet` | `getColumnFacet: (field: string, options?: FacetOptions \| undefined) => ColumnFacet \| undefined;` | inherited | Distinct values with counts for checkbox / Excel filters, or undefined without the `filter` module. |
| `getPageInfo` | `getPageInfo: () => PageInfo \| undefined;` | inherited | Pager model, or undefined without the `paging` module. |
| `groupColumn` | `groupColumn: (field: string, index?: number \| undefined) => CommandResult;` | inherited | Needs the `grouping` module. |
| `ungroupColumn` | `ungroupColumn: (field: string) => CommandResult;` | inherited |  |
| `clearGrouping` | `clearGrouping: () => CommandResult;` | inherited |  |
| `toggleGroup` | `toggleGroup: (group: GroupTarget, expanded?: boolean \| undefined) => CommandResult;` | inherited | Toggles (or sets) one group by row id, path key, or path. |
| `expandAllGroups` | `expandAllGroups: () => CommandResult;` | inherited |  |
| `collapseAllGroups` | `collapseAllGroups: () => CommandResult;` | inherited |  |
| `getGroup` | `getGroup: (rowId: string) => GroupRowSnapshot \| undefined;` | inherited | Caption or footer snapshot of a group row id, or undefined. |
| `getAggregates` | `getAggregates: (groupId?: string \| undefined) => Readonly<Record<string, Readonly<Record<string, unknown>>>> \| undefined;` | inherited | Without an argument the footer aggregates (undefined without the `aggregates` module); with a group row id that group's aggregates (undefined for an unknown id). |
| `refresh` | `refresh: () => void;` | inherited | Re-reads the data with the current query and keeps the grid state: `engine.refresh()`. |
| `dispose` | `dispose: () => void;` | inherited |  |
| `getState` | `getState: (options?: DataGridStateOptions \| undefined) => DataGridState;` | inherited | Persistable state (columns, pinning, sorting, filters, grouping, paging, search, selection, scroll). |
| `restoreState` | `restoreState: (state: string \| DataGridState, options?: (DataGridStateOptions & DeserializeDataGridStateOptions) \| undefined) => RestoreResult;` | inherited | Restores a state (object or serialized) in one batch without recompiling columns. |
| `resetState` | `resetState: () => RestoreResult;` | inherited | Restores the state captured when this API was created. |
| `pinColumn` | `pinColumn: (field: string, pinned: DataGridColumnPin \| null) => CommandResult;` | inherited | Pins a column (id or field) to a side or unpins it (`null`). |
| `openColumnChooser` | `openColumnChooser: (position?: { readonly x: number; readonly y: number; } \| undefined) => void;` | inherited | Opens the column chooser; at the given viewport point, else at the grid start. |
| `openColumnMenu` | `openColumnMenu: (field: string) => void;` | inherited |  |
| `openFilterMenu` | `openFilterMenu: (field: string) => void;` | inherited |  |
| `closeOverlays` | `closeOverlays: () => void;` | inherited | Closes any open menu, dialog, or chooser (focus returns to its invoker). |
| `registerCommandHandler` | `registerCommandHandler: (command: DataGridUiCommand \| (string & {}), handler: DataGridCommandHandler) => () => void;` | inherited | Registers the handler of a UI command (toolbar, menus); returns the unregister function. |
| `runCommand` | `runCommand: (command: DataGridUiCommand \| (string & {}), payload?: Readonly<Record<string, unknown>> \| undefined) => boolean;` | inherited | Runs a UI command (handler, then a module command, else a dev warning). Returns true when handled. |
| `getHeaderElement` | `getHeaderElement: (field: string) => HTMLElement \| null;` | inherited | Header cell of a column (id or field); `null` outside the rendered window. |
| `getPartElement` | `getPartElement: (part: DataGridPart) => HTMLElement \| null;` | inherited | First rendered element of a part; `null` when it is not rendered. |
| `openSortDialog` | `openSortDialog: () => void;` | inherited | Opens the sort sheet (`showAdaptiveSortDialog`). |
| `openFilterDialog` | `openFilterDialog: (field?: string \| undefined) => void;` | inherited | Opens the filter sheet of `field`, or the list of filterable columns (`showAdaptiveFilterDialog`). |
| `isAdaptive` | `isAdaptive: () => boolean;` | inherited | True while the adaptive layout applies (derived from the measured container width). *Salmon* |
| `copy` | `copy: (options?: DataGridCopyOptions \| undefined) => CommandResult;` | inherited | Copies the cell range, else the selected rows, else the focused cell to the system clipboard (drafts included). Falls back to a copy dialog when the browser blocks clipboard access. `rejected` with `nothingToCopy` or `cancelled` (`onBeforeCopy`). |
| `paste` | `paste: (text?: string \| undefined) => CommandResult;` | inherited | Pastes TSV `text` at the selected range or focused cell. Without `text`, reads the system clipboard (`async`), or opens a paste dialog when the Clipboard API is unavailable. |
| `startEdit` | `startEdit: (rowId?: string \| undefined, field?: string \| undefined) => CommandResult;` | inherited | Row and dialog mode edit the row, batch and cell mode the cell. Without a row id: the first selected row. |
| `save` | `save: () => CommandResult;` | inherited | Saves: the active row or cell; in batch mode every pending change. |
| `saveCell` | `saveCell: () => CommandResult;` | inherited | Commits the active editor only (batch mode keeps the change pending). |
| `cancelEdit` | `cancelEdit: () => CommandResult;` | inherited | Discards the active editor; in batch mode without an open editor, every pending change. |
| `addRow` | `addRow: (row?: Readonly<Record<string, unknown>> \| undefined, index?: number \| undefined) => CommandResult;` | inherited | Index 0 adds at the top, at or past the end at the bottom. |
| `deleteRows` | `deleteRows: (rowIds?: string \| readonly string[] \| undefined) => CommandResult;` | inherited | Without ids: the selected rows. Batch mode marks the rows until save. |
| `updateRow` | `updateRow: (rowId: string, row: Readonly<Record<string, unknown>>) => CommandResult;` | inherited |  |
| `updateCell` | `updateCell: (rowId: string, field: string, value: unknown) => CommandResult;` | inherited | Edits a cell as a user would (draft in batch mode). |
| `setCellValue` | `setCellValue: (rowId: string, field: string, value: unknown) => CommandResult;` | inherited | Silent data updates without the edit lifecycle (local sources). |
| `setRowData` | `setRowData: (rowId: string, row: Row) => CommandResult;` | inherited |  |
| `applyChanges` | `applyChanges: (changes: EditDataChanges<Row>) => CommandResult;` | inherited |  |
| `getPendingChanges` | `getPendingChanges: () => EditBatchChanges<Row>;` | inherited |  |
| `getBatchPreview` | `getBatchPreview: () => EditPreview \| undefined;` | inherited |  |
| `getEditSnapshot` | `getEditSnapshot: () => EditSnapshot \| undefined;` | inherited |  |
| `hasUnsavedChanges` | `hasUnsavedChanges: () => boolean;` | inherited |  |
| `whenEditSettled` | `whenEditSettled: () => Promise<void>;` | inherited |  |
| `validateBatch` | `validateBatch: () => Promise<boolean>;` | inherited | Validates every pending change without saving; resolves true when valid. |
| `undo` | `undo: () => CommandResult;` | inherited | Undoes the last edit (needs `editing.undo`). |
| `redo` | `redo: () => CommandResult;` | inherited |  |
| `fillSelection` | `fillSelection: (rowId: string, field: string) => CommandResult;` | inherited | Fills the selected cell range's content over the range extended to `field` of `rowId` (fill handle). |
| `sortColumn` | `sortColumn: (field: string, direction: DataGridSortDirection, options?: { multiple?: boolean; } \| undefined) => CommandResult;` | inherited | Sorts by a column; `multiple` adds it to a multi-column sort. |
| `removeSort` | `removeSort: (field: string) => CommandResult;` | inherited |  |
| `clearSorting` | `clearSorting: () => CommandResult;` | inherited |  |
| `filterColumn` | `filterColumn: (field: string, operator: DataGridFilterOperator, value: Json, options?: { logic?: "and" \| "or"; matchCase?: boolean; ignoreAccents?: boolean; } \| undefined) => CommandResult;` | inherited | Replaces the column's top-level conditions with one condition (an array value with a scalar operator ORs one condition per value). |
| `removeFilter` | `removeFilter: (field: string) => CommandResult;` | inherited | Removes the filters of one column. |
| `clearFiltering` | `clearFiltering: (fields?: string \| readonly string[] \| undefined) => CommandResult;` | inherited | Removes the filters of the given columns, or every filter. |
| `search` | `search: (text: string) => CommandResult;` | inherited |  |
| `clearSearch` | `clearSearch: () => CommandResult;` | inherited |  |
| `goToPage` | `goToPage: (page: number) => CommandResult;` | inherited |  |
| `setPageSize` | `setPageSize: (pageSize: number) => CommandResult;` | inherited |  |
| `expandDetail` | `expandDetail: (rowId: string) => CommandResult;` | inherited |  |
| `collapseDetail` | `collapseDetail: (rowId: string) => CommandResult;` | inherited |  |
| `toggleDetail` | `toggleDetail: (rowId: string, expanded?: boolean \| undefined) => CommandResult;` | inherited | Toggles one detail row; `expanded` forces a state. |
| `expandAllDetails` | `expandAllDetails: () => CommandResult;` | inherited |  |
| `collapseAllDetails` | `collapseAllDetails: () => CommandResult;` | inherited |  |
| `isDetailExpanded` | `isDetailExpanded: (rowId: string) => boolean;` | inherited |  |
| `getChildGrid` | `getChildGrid: (rowId: string) => DataGridApi<unknown> \| null;` | inherited | The mounted child grid of a parent row (null when collapsed or not rendered). |
| `moveRows` | `moveRows: (rowIds: string \| readonly string[], to: number \| DataGridMoveTarget) => CommandResult;` | inherited | Moves rows so the first one ends at data row index `toIndex`, or next to / into a target row (`{ targetRowId, position }`; `into` makes them the last children of the target in tree mode). |
| `exportToExcel` | `exportToExcel: (options?: DataGridExcelExportOptions<Row> \| undefined) => Promise<ExportFile<Uint8Array<ArrayBufferLike>> \| null>;` | inherited | XLSX export (`excelExport`); resolves to the file, or null when prevented. Downloads unless `download: false`. |
| `exportToPdf` | `exportToPdf: (options?: DataGridPdfExportOptions<Row> \| undefined) => Promise<ExportFile<Uint8Array<ArrayBufferLike>> \| null>;` | inherited | PDF export (`pdfExport`). |
| `exportToCsv` | `exportToCsv: (options?: DataGridCsvExportOptions<Row> \| undefined) => Promise<ExportFile<string> \| null>;` | inherited | CSV export (`csvExport`); no writer package needed. |
| `print` | `print: (options?: DataGridPrintOptions<Row> \| undefined) => Promise<boolean>;` | inherited | Prints the grid (every row of the scope, no virtualization). Resolves false when prevented or outside a browser. |
| `setLoading` | `setLoading: (loading: boolean) => void;` | inherited | Shows the loading indicator until `setLoading(false)`. A data load in progress shows it regardless. |
| `expandAllTreeRows` | `expandAllTreeRows: () => CommandResult;` | inherited |  |
| `collapseAllTreeRows` | `collapseAllTreeRows: () => CommandResult;` | inherited |  |
| `expandTreeLevel` | `expandTreeLevel: (depth: number) => CommandResult;` | inherited | Expands the parents at `depth` (0: roots). |
| `collapseTreeLevel` | `collapseTreeLevel: (depth: number) => CommandResult;` | inherited |  |
| `expandTreeRows` | `expandTreeRows: (rowIds: string \| readonly string[]) => CommandResult;` | inherited |  |
| `collapseTreeRows` | `collapseTreeRows: (rowIds: string \| readonly string[]) => CommandResult;` | inherited |  |
| `toggleTreeRow` | `toggleTreeRow: (rowId: string, expanded?: boolean \| undefined) => CommandResult;` | inherited |  |
| `indentRows` | `indentRows: (rowIds: string \| readonly string[]) => CommandResult;` | inherited | Moves rows under their previous sibling. |
| `outdentRows` | `outdentRows: (rowIds: string \| readonly string[]) => CommandResult;` | inherited | Moves rows after their parent, as its siblings. |
| `getTreeRow` | `getTreeRow: (rowId: string) => DataGridTreeRowInfo \| null;` | inherited |  |
| `getChildRows` | `getChildRows: (rowId: string \| null) => readonly Row[];` | inherited | Kept children of a row in view order (`null`: the roots). |
| `reloadTreeChildren` | `reloadTreeChildren: (rowId: string) => CommandResult;` | inherited | *Salmon*: retries a failed lazy child load. |
| `getVisibleRows` | `getVisibleRows: () => readonly Row[];` | inherited | Visible data rows in view order. |
| `pinRows` | `pinRows: (rowIds: string \| readonly string[]) => CommandResult;` | inherited | Pins rows to the top zone (rejected unless `isRowPinned` or `defaultPinnedRows` is set). |
| `unpinRows` | `unpinRows: (rowIds: string \| readonly string[]) => CommandResult;` | inherited | Unpins rows, also rows `isRowPinned` matches. |
| `isRowPinned` | `isRowPinned: (rowId: string) => boolean;` | inherited | True when the row is pinned, whether or not the current filter shows it. |
| `getPinnedRowIds` | `getPinnedRowIds: () => readonly string[];` | inherited | Ids of the pinned rows shown, in display order. |
| `openFilterBuilder` | `openFilterBuilder: () => void;` | inherited | Opens the filter builder dialog. Ignored unless `filtering.builder` is set. |
| `closeFilterBuilder` | `closeFilterBuilder: () => void;` | inherited | Closes the filter builder dialog without applying. |
| `getViewport` | `getViewport: () => DataGridViewport;` | inherited | Scroll sync extension point: the current body viewport. |
| `subscribeViewport` | `subscribeViewport: (listener: () => void) => () => void;` | inherited | Calls `listener` outside React on every body scroll and layout change; returns the unsubscribe function. |
| `getRowOffsets` | `getRowOffsets: () => RowMetrics;` | inherited | Row height extension point: the row offsets of the visible row model (the body's own prefix sums). |
| `scrollTo` | `scrollTo: (options: DataGridScrollToOptions) => void;` | inherited | Scrolls the body to an offset. An omitted axis keeps its position; offsets are clamped to the scroll range. |
| `getPageSizeForHeight` | `getPageSizeForHeight: (height: number) => number;` | inherited | Whole data rows that fit in `height` px after the toolbar, group drop area, header rows, footer aggregate rows and pager; 0 when none fit. Rows count `rowHeight` (the estimate with measured rows, the card height in adaptive vertical mode). Before mount only the header and footer rows are subtracted. |
| `selectRows` | `selectRows: (rowIds: string \| readonly string[], options?: { mode?: "add" \| "remove" \| "replace" \| "toggle"; } \| undefined) => CommandResult;` | inherited |  |
| `selectRowRange` | `selectRowRange: (fromRowId: string, toRowId: string, options?: { mode?: "add" \| "replace"; } \| undefined) => CommandResult;` | inherited |  |
| `selectAll` | `selectAll: (options?: { scope?: "filtered" \| "page"; } \| undefined) => CommandResult;` | inherited | `page`: every row of the current page (all rows without paging). `filtered` (default with paging off): every row matching the query, O(1). |
| `clearSelection` | `clearSelection: (parts?: { rows?: boolean; cells?: boolean; columns?: boolean; } \| undefined) => CommandResult;` | inherited |  |
| `selectCells` | `selectCells: (cells: readonly DataGridCellKey[], options?: { mode?: "add" \| "replace" \| "toggle"; } \| undefined) => CommandResult;` | inherited |  |
| `selectCellRange` | `selectCellRange: (anchor: DataGridCellKey, focus: DataGridCellKey, options?: { mode?: "add" \| "replace"; } \| undefined) => CommandResult;` | inherited |  |
| `selectColumns` | `selectColumns: (fields: string \| readonly string[], options?: { mode?: "add" \| "replace" \| "toggle"; } \| undefined) => CommandResult;` | inherited |  |
| `isRowSelected` | `isRowSelected: (rowId: string) => boolean;` | inherited |  |
| `getSelectedRowIds` | `getSelectedRowIds: () => readonly string[];` | inherited |  |
| `getSelectedRows` | `getSelectedRows: () => readonly Row[];` | inherited | Raw rows, in the order of `getSelectedRowIds()`. |
| `getSelectedCells` | `getSelectedCells: () => readonly DataGridCellKey[];` | inherited |  |
| `getSelectedColumns` | `getSelectedColumns: () => readonly string[];` | inherited |  |
| `getSelection` | `getSelection: () => SerializedSelection \| undefined;` | inherited | Serializable selection (scope, ids or excluded ids, cell ranges, columns). |
| `setSelection` | `setSelection: (selection: SerializedSelection) => CommandResult;` | inherited |  |
| `getSelectionSummary` | `getSelectionSummary: () => SelectionSummary \| undefined;` | inherited |  |

### DataGridBeforeCopyEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridBeforeCopyEvent

```ts
interface DataGridBeforeCopyEvent extends DataGridEvent {
    data: string;
    readonly includeHeaders: boolean;
    readonly copied: 'range' | 'rows' | 'cell';
    readonly cells: number;
    readonly rowIds: readonly RowId[];
    readonly fields: readonly string[];
}
```

`onBeforeCopy`: `preventDefault()` cancels, assigning `data` replaces the text.

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `data` | `data: string;` |  | The TSV text about to be written to the clipboard. Assign to replace it. |
| `includeHeaders` | `readonly includeHeaders: boolean;` |  |  |
| `copied` | `readonly copied: 'range' \| 'rows' \| 'cell';` |  | What was copied: the cell range, the selected rows, or the focused cell. |
| `cells` | `readonly cells: number;` |  | Copied data cells (headers excluded). |
| `rowIds` | `readonly rowIds: readonly RowId[];` |  |  |
| `fields` | `readonly fields: readonly string[];` |  |  |
| `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). |

### DataGridBeforeExportEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridBeforeExportEvent

```ts
interface DataGridBeforeExportEvent<Row> extends DataGridEvent {
    readonly format: ExportFormat;
    readonly options: DataGridExportOptions<Row>;
}
```

Before an Excel or PDF export: `preventDefault()` cancels (the method resolves to null).

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `format` | `readonly format: ExportFormat;` |  |  |
| `options` | `readonly options: DataGridExportOptions<Row>;` |  |  |
| `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). |

### DataGridBeforeFillEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridBeforeFillEvent

```ts
interface DataGridBeforeFillEvent extends DataGridEvent {
    readonly range: {
        readonly anchor: DataGridClipboardCell;
        readonly focus: DataGridClipboardCell;
    };
    readonly target: DataGridClipboardCell;
}
```

`onBeforeFill`: `preventDefault()` cancels the fill.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `range` | `readonly range: {     readonly anchor: DataGridClipboardCell;     readonly focus: DataGridClipboardCell; };` |  | The source range whose values are tiled. |
| `target` | `readonly target: DataGridClipboardCell;` |  | The cell the range is extended to. |
| `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). |

### DataGridBeforePasteEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridBeforePasteEvent

```ts
interface DataGridBeforePasteEvent extends DataGridEvent {
    data: string;
    readonly target: DataGridClipboardCell | null;
}
```

`onBeforePaste`: `preventDefault()` cancels, assigning `data` changes the pasted text.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `data` | `data: string;` |  | The clipboard text (TSV). Assign to change what is pasted. |
| `target` | `readonly target: DataGridClipboardCell \| null;` |  | Top-left target cell: the selected range's top-left cell, else the focused cell; null without a target. |
| `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). |

### DataGridBeforePrintEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridBeforePrintEvent

```ts
interface DataGridBeforePrintEvent extends DataGridEvent {
    readonly scope: 'all' | 'page';
    readonly hierarchy: ExportHierarchyMode;
}
```

`beforePrint`: `preventDefault()` cancels. Fired by `print()` before `window.print()`.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `scope` | `readonly scope: 'all' \| 'page';` |  |  |
| `hierarchy` | `readonly hierarchy: ExportHierarchyMode;` |  |  |
| `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). |

### DataGridCellClickEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCellClickEvent

```ts
interface DataGridCellClickEvent<Row> extends DataGridEvent {
    readonly rowId: RowId;
    readonly row: Row;
    readonly rowIndex: number;
    readonly field: string;
    readonly column: DataGridColumnInfo<Row> | null;
    readonly value: unknown;
    readonly element: HTMLElement;
    readonly nativeEvent: MouseEvent;
}
```

`onCellClick` / `onCellDoubleClick`. `preventDefault()` cancels the built-in action.

Members (12):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row;` |  |  |
| `rowIndex` | `readonly rowIndex: number;` |  |  |
| `field` | `readonly field: string;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row> \| null;` |  |  |
| `value` | `readonly value: unknown;` |  | The cell value (`valueGetter`, else `field`). |
| `element` | `readonly element: HTMLElement;` |  | The cell element. |
| `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). |

### DataGridCellContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCellContext

```ts
interface DataGridCellContext<Row> {
    row: Row;
    rowId: RowId;
    field: string;
    column: DataGridColumnInfo<Row>;
    value: unknown;
    formattedValue: string;
    rowIndex: number;
    selected: boolean;
    editing: boolean;
    tree?: DataGridTreeContext;
}
```

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `row` | `row: Row;` |  |  |
| `rowId` | `rowId: RowId;` |  |  |
| `field` | `field: string;` |  | The column key (column `id`, else `field`). |
| `column` | `column: DataGridColumnInfo<Row>;` |  |  |
| `value` | `value: unknown;` |  |  |
| `formattedValue` | `formattedValue: string;` |  |  |
| `rowIndex` | `rowIndex: number;` |  |  |
| `selected` | `selected: boolean;` |  |  |
| `editing` | `editing: boolean;` |  |  |
| `tree` | `tree?: DataGridTreeContext;` | optional | Tree mode, the tree column's cells only: depth, children, expansion and child load status. |

### DataGridCellKey

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCellKey

```ts
interface DataGridCellKey {
    readonly rowId: RowId;
    readonly field: string;
}
```

A cell by row id and column key.

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `field` | `readonly field: string;` |  |  |

### DataGridCellProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCellProps

```ts
interface DataGridCellProps<Row> {
    rowId: RowId;
    column: CompiledColumn<Row>;
    rowIndex: number;
    colIndex: number;
    colSpan?: number;
    rowSpan?: number;
    spanStyle?: CSSProperties | undefined;
    spanAnchor?: boolean;
    renderKey?: number | undefined;
}
```

Members (9):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `rowId: RowId;` |  |  |
| `column` | `column: CompiledColumn<Row>;` |  |  |
| `rowIndex` | `rowIndex: number;` |  |  |
| `colIndex` | `colIndex: number;` |  | 1-based `aria-colindex` (display position among visible leaves). |
| `colSpan` | `colSpan?: number;` | optional | Cell span: `aria-colspan` / `aria-rowspan` and the spanned width/height. |
| `rowSpan` | `rowSpan?: number;` | optional |  |
| `spanStyle` | `spanStyle?: CSSProperties \| undefined;` | optional |  |
| `spanAnchor` | `spanAnchor?: boolean;` | optional | A row span whose first row is above the rendered window, drawn in the window's first row: the cell carries its own `data-row-id` so pointer, focus and context-menu targets resolve to the span's row. |
| `renderKey` | `renderKey?: number \| undefined;` | optional | Render key of the column's render-only fields (`renderCell`, `cellClassName`, ...): changes when one of them changed without a recompile, so `memo` re-renders this column's cells only. |

### DataGridCellValueChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCellValueChangeEvent

```ts
interface DataGridCellValueChangeEvent extends DataGridEvent {
    readonly rowId: RowId;
    readonly field: string;
    readonly value: unknown;
    readonly previousValue: unknown;
}
```

`onBeforeCellValueChange` / `onCellValueChange`.

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `field` | `readonly field: string;` |  |  |
| `value` | `readonly value: unknown;` |  | Editor input (before parsing) in the before-event; the parsed draft value after. |
| `previousValue` | `readonly previousValue: unknown;` |  |  |
| `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). |

### DataGridChildGrid

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridChildGrid

```ts
interface DataGridChildGrid<Child = unknown, Parent = unknown> extends Omit<DataGridProps<Child>, 'data' | 'id' | 'ref' | 'children'> {
    readonly data: readonly Child[] | DataSource<Child> | ((parent: DataGridChildGridParent<Parent>) => readonly Child[] | DataSource<Child>);
    readonly joinField?: string;
    readonly parentField?: string;
    readonly childField?: string;
}
```

`childGrid` prop: every
`DataGrid` prop of the child, plus the child rows and the relation. The child
inherits `locale`, `dir`, `timeZone`, and `currency` unless set.

Members (163):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `data` | `readonly data: readonly Child[] \| DataSource<Child> \| ((parent: DataGridChildGridParent<Parent>) => readonly Child[] \| DataSource<Child>);` |  | Child rows: one array shared by every parent (indexed once by the join value), a data source (remote sources receive the relation filter), or a factory per parent. |
| `joinField` | `readonly joinField?: string;` | optional | Field present in parent and child rows. |
| `parentField` | `readonly parentField?: string;` | optional | Parent field when the names differ. Default `joinField`. |
| `childField` | `readonly childField?: string;` | optional | Child field when the names differ. Default `joinField`. |
| `pinnedColumns` | `pinnedColumns?: DataGridPinnedColumns;` | optional, inherited | The first / last N visible columns are pinned. Reactive. |
| `stickyRows` | `stickyRows?: number;` | optional, inherited | The first N rows of the visible row model stick below the header. |
| `stickyBottomRows` | `stickyBottomRows?: number;` | optional, inherited | The last N rows of the visible row model stick above the footer. |
| `onBeforeColumnPinChange` | `onBeforeColumnPinChange?: ((event: DataGridColumnPinChangeEvent) => void);` | optional, inherited |  |
| `onColumnPinChange` | `onColumnPinChange?: ((event: DataGridColumnPinChangeEvent) => void);` | optional, inherited |  |
| `mergeCells` | `mergeCells?: DataGridMergeCells;` | optional, inherited | DataGrid-wide merging of equal adjacent values (row merging also works under row virtualization). |
| `columnMenu` | `columnMenu?: boolean \| readonly (DataGridMenuItem \| DataGridColumnMenuItemId)[];` | optional, inherited | Column menu; an array lists the items in order (built-in ids or custom items). `column.menu: false` opts a column out. |
| `onBeforeColumnMenuOpen` | `onBeforeColumnMenuOpen?: ((event: DataGridColumnMenuOpenEvent<Child>) => void);` | optional, inherited |  |
| `onBeforeColumnMenuClose` | `onBeforeColumnMenuClose?: ((event: DataGridColumnMenuCloseEvent<Child>) => void);` | optional, inherited |  |
| `onColumnMenuItemClick` | `onColumnMenuItemClick?: ((event: DataGridColumnMenuItemClickEvent<Child>) => void);` | optional, inherited |  |
| `renderColumnMenu` | `renderColumnMenu?: ((ctx: DataGridColumnMenuContext<Child>) => ReactNode);` | optional, inherited |  |
| `columnChooser` | `columnChooser?: boolean \| DataGridColumnChooser<Child>;` | optional, inherited |  |
| `onBeforeColumnChooserOpen` | `onBeforeColumnChooserOpen?: ((event: DataGridColumnChooserOpenEvent<Child>) => void);` | optional, inherited |  |
| `toolbar` | `toolbar?: readonly (DataGridToolbarItem \| DataGridToolbarItemId)[];` | optional, inherited |  |
| `onToolbarItemClick` | `onToolbarItemClick?: ((event: DataGridToolbarItemClickEvent) => void);` | optional, inherited |  |
| `renderToolbar` | `renderToolbar?: ((ctx: DataGridToolbarContext<Child>) => ReactNode);` | optional, inherited |  |
| `contextMenu` | `contextMenu?: boolean \| readonly (DataGridMenuItem \| DataGridContextMenuItemId)[];` | optional, inherited | Context menu; an array lists the items in order. Items that do not apply to the target are dropped. |
| `onBeforeContextMenuOpen` | `onBeforeContextMenuOpen?: ((event: DataGridContextMenuOpenEvent) => void);` | optional, inherited |  |
| `onBeforeContextMenuClose` | `onBeforeContextMenuClose?: ((event: DataGridContextMenuCloseEvent) => void);` | optional, inherited |  |
| `onContextMenuItemClick` | `onContextMenuItemClick?: ((event: DataGridContextMenuItemClickEvent<Child>) => void);` | optional, inherited |  |
| `renderContextMenu` | `renderContextMenu?: ((ctx: DataGridContextMenuContext) => ReactNode);` | optional, inherited |  |
| `onColumnResizeStart` | `onColumnResizeStart?: ((event: DataGridColumnResizeEvent) => void);` | optional, inherited |  |
| `onColumnResize` | `onColumnResize?: ((event: DataGridColumnResizeEvent) => void);` | optional, inherited |  |
| `onColumnResizeEnd` | `onColumnResizeEnd?: ((event: DataGridColumnResizeEvent) => void);` | optional, inherited |  |
| `onColumnDragStart` | `onColumnDragStart?: ((event: DataGridColumnDragEvent) => void);` | optional, inherited |  |
| `onColumnDrag` | `onColumnDrag?: ((event: DataGridColumnDragEvent) => void);` | optional, inherited |  |
| `onColumnDrop` | `onColumnDrop?: ((event: DataGridColumnDragEvent) => void);` | optional, inherited |  |
| `adaptive` | `adaptive?: boolean \| DataGridAdaptive;` | optional, inherited | Adaptive UI (`enableAdaptiveUI`, `adaptiveUIMode`, `rowRenderingMode`): full-screen sheets for menus and dialogs, 44 px touch targets, touch long-press, and optional vertical (card) rows. `true` is `{ target: 'both' }`. |
| `onBeforeAdaptiveDialogOpen` | `onBeforeAdaptiveDialogOpen?: ((event: DataGridAdaptiveDialogOpenEvent) => void);` | optional, inherited |  |
| `onBeforeCopy` | `onBeforeCopy?: ((event: DataGridBeforeCopyEvent) => void);` | optional, inherited |  |
| `onBeforePaste` | `onBeforePaste?: ((event: DataGridBeforePasteEvent) => void);` | optional, inherited |  |
| `onBeforeFill` | `onBeforeFill?: ((event: DataGridBeforeFillEvent) => void);` | optional, inherited |  |
| `editing` | `editing?: boolean \| DataGridEditing<Child>;` | optional, inherited | Editing. `true` for the defaults (row mode). The module is registered when the initial value is set. |
| `onBeforeEditStart` | `onBeforeEditStart?: ((event: DataGridEditStartEvent<Child>) => void);` | optional, inherited |  |
| `onEditStart` | `onEditStart?: ((event: DataGridEditStartEvent<Child>) => void);` | optional, inherited |  |
| `onBeforeCellValueChange` | `onBeforeCellValueChange?: ((event: DataGridCellValueChangeEvent) => void);` | optional, inherited |  |
| `onCellValueChange` | `onCellValueChange?: ((event: DataGridCellValueChangeEvent) => void);` | optional, inherited |  |
| `onBeforeSave` | `onBeforeSave?: ((event: DataGridSaveEvent<Child>) => void);` | optional, inherited |  |
| `onSave` | `onSave?: ((event: DataGridSaveEvent<Child>) => void);` | optional, inherited |  |
| `onBeforeAdd` | `onBeforeAdd?: ((event: DataGridAddEvent<Child>) => void);` | optional, inherited |  |
| `onAdd` | `onAdd?: ((event: DataGridAddEvent<Child>) => void);` | optional, inherited |  |
| `onBeforeDelete` | `onBeforeDelete?: ((event: DataGridDeleteEvent<Child>) => void);` | optional, inherited |  |
| `onDelete` | `onDelete?: ((event: DataGridDeleteEvent<Child>) => void);` | optional, inherited |  |
| `onBeforeEditCancel` | `onBeforeEditCancel?: ((event: DataGridEditCancelEvent) => void);` | optional, inherited |  |
| `onEditCancel` | `onEditCancel?: ((event: DataGridEditCancelEvent) => void);` | optional, inherited |  |
| `onCommandClick` | `onCommandClick?: ((event: DataGridCommandClickEvent<Child>) => void);` | optional, inherited |  |
| `sorting` | `sorting?: boolean \| DataGridSorting;` | optional, inherited | `true` or options: header sorting. |
| `filtering` | `filtering?: boolean \| DataGridFiltering;` | optional, inherited | `true` or options: filtering and its UI. |
| `search` | `search?: boolean \| DataGridSearch;` | optional, inherited | `true` or options: searching. |
| `paging` | `paging?: boolean \| DataGridPaging;` | optional, inherited | `true` or options: paging and the pager. |
| `renderPager` | `renderPager?: ((ctx: DataGridPagerContext) => ReactNode);` | optional, inherited | Replaces the pager. |
| `onBeforeSortChange` | `onBeforeSortChange?: ((event: DataGridSortChangeEvent) => void);` | optional, inherited |  |
| `onSortChange` | `onSortChange?: ((event: DataGridSortChangeEvent) => void);` | optional, inherited |  |
| `onBeforeFilterChange` | `onBeforeFilterChange?: ((event: DataGridFilterChangeEvent) => void);` | optional, inherited |  |
| `onFilterChange` | `onFilterChange?: ((event: DataGridFilterChangeEvent) => void);` | optional, inherited |  |
| `onBeforeFilterMenuOpen` | `onBeforeFilterMenuOpen?: ((event: DataGridFilterMenuOpenEvent) => void);` | optional, inherited |  |
| `onFilterMenuOpen` | `onFilterMenuOpen?: ((event: DataGridFilterMenuOpenEvent) => void);` | optional, inherited |  |
| `onBeforeSearchChange` | `onBeforeSearchChange?: ((event: DataGridSearchChangeEvent) => void);` | optional, inherited |  |
| `onSearchChange` | `onSearchChange?: ((event: DataGridSearchChangeEvent) => void);` | optional, inherited |  |
| `onBeforePageChange` | `onBeforePageChange?: ((event: DataGridPageChangeEvent) => void);` | optional, inherited |  |
| `onPageChange` | `onPageChange?: ((event: DataGridPageChangeEvent) => void);` | optional, inherited |  |
| `onError` | `onError?: ((event: DataGridErrorEvent) => void);` | optional, inherited | An action was rejected (unknown column, page out of range, ...). |
| `renderDetail` | `renderDetail?: ((ctx: DataGridDetailContext<Child>) => ReactNode);` | optional, inherited | Detail row content below each expanded row. |
| `detailHeight` | `detailHeight?: number;` | optional, inherited | Estimated detail row height in px before measurement. Default 150. |
| `hasDetail` | `hasDetail?: ((row: Child) => boolean);` | optional, inherited | Rows without a detail (no toggle). Called for rendered rows only. |
| `loadDetail` | `loadDetail?: ((ctx: DataGridDetailLoadContext<Child>) => unknown);` | optional, inherited | Async detail content, started on expand; `renderDetail` receives `status`, `data`, `error`. |
| `defaultExpandedDetails` | `defaultExpandedDetails?: boolean \| readonly string[];` | optional, inherited | Initially expanded details: `true` for every row, or row ids (initial only). |
| `childGrid` | `childGrid?: DataGridChildGrid<unknown, Child>;` | optional, inherited | Child grid inside each expanded row (hierarchy grid). An inline object sees child rows as `unknown`; `defineChildGrid<Child, Parent>(config)` types the child rows. |
| `onBeforeDetailToggle` | `onBeforeDetailToggle?: ((event: DataGridDetailToggleEvent<Child>) => void);` | optional, inherited |  |
| `onDetailToggle` | `onDetailToggle?: ((event: DataGridDetailToggleEvent<Child>) => void);` | optional, inherited |  |
| `rowDrag` | `rowDrag?: boolean \| DataGridRowDrag;` | optional, inherited | Row drag and drop with a drag handle column; `true` reorders within the grid. |
| `onRowDragStart` | `onRowDragStart?: ((event: DataGridRowDragEvent<Child>) => void);` | optional, inherited | Cancel with `event.preventDefault()`. |
| `onRowDrag` | `onRowDrag?: ((event: DataGridRowDragEvent<Child>) => void);` | optional, inherited | Once per animation frame while dragging. |
| `onBeforeRowDrop` | `onBeforeRowDrop?: ((event: DataGridRowDragEvent<Child>) => void);` | optional, inherited | Cancel with `event.preventDefault()`. |
| `onRowDrop` | `onRowDrop?: ((event: DataGridRowDragEvent<Child>) => void);` | optional, inherited |  |
| `renderRowDragPreview` | `renderRowDragPreview?: ((ctx: DataGridRowDragPreviewContext<Child>) => ReactNode);` | optional, inherited | Drag preview content (default: the first cell text and the row count). |
| `exportWriters` | `exportWriters?: DataGridExportWriters;` | optional, inherited | Excel and PDF writer loaders; without one the matching toolbar and menu items are disabled. |
| `onBeforeExport` | `onBeforeExport?: ((event: DataGridBeforeExportEvent<Child>) => void);` | optional, inherited |  |
| `onExport` | `onExport?: ((event: DataGridExportEvent<Child>) => void);` | optional, inherited |  |
| `printing` | `printing?: DataGridPrinting<Child>;` | optional, inherited | Print scope and hierarchy mode (`print()` options override them). |
| `onBeforePrint` | `onBeforePrint?: ((event: DataGridBeforePrintEvent) => void);` | optional, inherited |  |
| `onAfterPrint` | `onAfterPrint?: ((event: DataGridAfterPrintEvent) => void);` | optional, inherited |  |
| `loadingIndicator` | `loadingIndicator?: "skeleton" \| "spinner";` | optional, inherited | Built-in loading indicator. Default `spinner`. |
| `renderLoading` | `renderLoading?: ((ctx: DataGridLoadingContext) => ReactNode);` | optional, inherited | Replaces the content of the loading indicator (presentational: the grid announces loading itself). |
| `onRowClick` | `onRowClick?: ((event: DataGridRowClickEvent<Child>) => void);` | optional, inherited | A data row was clicked. `preventDefault()` skips the built-in selection and focus. |
| `onRowDoubleClick` | `onRowDoubleClick?: ((event: DataGridRowClickEvent<Child>) => void);` | optional, inherited | A data row was double-clicked. `preventDefault()` skips the built-in edit start. |
| `onCellClick` | `onCellClick?: ((event: DataGridCellClickEvent<Child>) => void);` | optional, inherited | A cell of a data row was clicked; fires before `onRowClick`. |
| `onCellDoubleClick` | `onCellDoubleClick?: ((event: DataGridCellClickEvent<Child>) => void);` | optional, inherited | A cell of a data row was double-clicked; fires before `onRowDoubleClick`. |
| `recordCommands` | `recordCommands?: boolean;` | optional, inherited | Keeps a serializable log of applied commands (`api.engine.getCommandLog()`). Initial only. Default false. |
| `instrument` | `instrument?: boolean;` | optional, inherited | Exposes store counters (`api.engine.getInstrumentation()`). Initial only. Default false. |
| `tree` | `tree?: boolean \| DataGridTree<Child>;` | optional, inherited | Tree mode: rows with children, indented in the tree column. Read at creation (its options are reactive). |
| `onBeforeTreeToggle` | `onBeforeTreeToggle?: ((event: DataGridTreeToggleEvent<Child>) => void);` | optional, inherited |  |
| `onTreeToggle` | `onTreeToggle?: ((event: DataGridTreeToggleEvent<Child>) => void);` | optional, inherited |  |
| `isRowPinned` | `isRowPinned?: ((row: Child) => boolean);` | optional, inherited | Rows pinned to the top zone. Pinned rows stay visible above the scrolling rows on every page, are left out of `pageSize`, and follow sorting, filtering, search and edits. Pure; read once when the grid is created. Turns row pinning on. |
| `defaultPinnedRows` | `defaultPinnedRows?: readonly string[];` | optional, inherited | Initially pinned row ids (initial only). Turns row pinning on; pass `[]` to only use `pinRows`. |
| `onBeforeFilterBuilderOpen` | `onBeforeFilterBuilderOpen?: ((event: DataGridFilterBuilderOpenEvent) => void);` | optional, inherited |  |
| `columns` | `columns?: readonly DataGridColumn<Child>[];` | optional, inherited | Column definitions; `<DataGridColumn>` children are the JSX form (children win over `columns`). |
| `getRowId` | `getRowId?: ((row: Child) => string \| number);` | optional, inherited | Row identity. Default: the `primaryKey` column(s), else the `id` field (with a development warning). |
| `modules` | `modules?: readonly DataGridModule<Child, unknown, DataGridCommand, string, {}>[];` | optional, inherited | Extra core modules (initial only). |
| `features` | `features?: readonly DataGridFeature[];` | optional, inherited | *Salmon*. Render features to use synchronously, from `@salmonui/data-grid/features`. Optional: a grid loads the features its props need on demand; features passed here skip that load (no placeholder on a client-only render). Read at creation. |
| `locale` | `locale?: string;` | optional, inherited |  |
| `timeZone` | `timeZone?: string;` | optional, inherited | IANA time zone for date formatting. Set it for SSR: server and client must format identically. |
| `currency` | `currency?: string;` | optional, inherited |  |
| `dir` | `dir?: "auto" \| "ltr" \| "rtl";` | optional, inherited | Text direction. `'auto'` follows the `locale` script (`ar`, `he`, `fa`, ... are right-to-left). Default: the inherited `dir`. Reactive. |
| `height` | `height?: string \| number;` | optional, inherited | Viewport height: px, any CSS length (`'100%'` needs a fixed-height parent), or `'auto'` (no row virtualization). Default 400. |
| `width` | `width?: string \| number;` | optional, inherited |  |
| `rowHeight` | `rowHeight?: number;` | optional, inherited | Fixed row height in px. Default 36. |
| `getRowHeight` | `getRowHeight?: ((row: Child) => number);` | optional, inherited | Per-row fixed height. |
| `estimatedRowHeight` | `estimatedRowHeight?: number;` | optional, inherited | Enables measured row heights with this estimate (variable content, templates, wrapping). |
| `headerHeight` | `headerHeight?: number;` | optional, inherited | Header row height in px (per stacked level). Default 40. |
| `defaultColumnWidth` | `defaultColumnWidth?: number;` | optional, inherited | Width of columns without `width`. Default 160. |
| `virtualization` | `virtualization?: boolean \| DataGridVirtualization;` | optional, inherited | Row and column virtualization; `true` (default) for the defaults, `false` renders every row and column. |
| `infiniteScroll` | `infiniteScroll?: boolean \| DataGridInfiniteScroll<Child>;` | optional, inherited | Infinite scrolling for remote sources: rows load in blocks as the viewport approaches them. |
| `renderLoadingRow` | `renderLoadingRow?: ((ctx: DataGridLoadingRowContext) => ReactNode);` | optional, inherited | Placeholder row while its block loads, or after the load failed. Default: the loading text, or the error and a Retry button. |
| `initialRows` | `initialRows?: number;` | optional, inherited | Rows in the deterministic server/initial range. Default 20. |
| `initialColumns` | `initialColumns?: number;` | optional, inherited | Center columns in the deterministic server/initial range. Default 20. |
| `textWrap` | `textWrap?: DataGridTextWrap;` | optional, inherited |  |
| `gridLines` | `gridLines?: DataGridLines;` | optional, inherited |  |
| `overflow` | `overflow?: DataGridOverflow;` | optional, inherited | Default text overflow of every column. Default `ellipsis`. |
| `highlightOnHover` | `highlightOnHover?: boolean;` | optional, inherited | Row hover highlight. Default true. |
| `striped` | `striped?: boolean;` | optional, inherited | Alternate row shading. Default true. |
| `resizable` | `resizable?: boolean;` | optional, inherited | Pointer and keyboard column resize. Default false; column `resizable` refines it. |
| `resizeMode` | `resizeMode?: "auto" \| "normal";` | optional, inherited | Column fit. `'normal'` (default): widths are kept, leaving empty space or scrolling. `'auto'`: when the columns are narrower than the grid they stretch proportionally to fill it, and a pointer resize re-fits the other columns. |
| `reorderable` | `reorderable?: boolean;` | optional, inherited | Pointer and keyboard column reorder. Default false; column `reorderable` refines it. |
| `onBeforeColumnVisibilityChange` | `onBeforeColumnVisibilityChange?: ((event: DataGridColumnVisibilityChangeEvent) => void);` | optional, inherited |  |
| `onColumnVisibilityChange` | `onColumnVisibilityChange?: ((event: DataGridColumnVisibilityChangeEvent) => void);` | optional, inherited |  |
| `onBeforeColumnReorder` | `onBeforeColumnReorder?: ((event: DataGridColumnReorderEvent) => void);` | optional, inherited |  |
| `onColumnReorder` | `onColumnReorder?: ((event: DataGridColumnReorderEvent) => void);` | optional, inherited |  |
| `grouping` | `grouping?: boolean \| DataGridGrouping<Child>;` | optional, inherited | `true` or settings: grouping UI and behavior. |
| `onBeforeGroupChange` | `onBeforeGroupChange?: ((event: DataGridGroupChangeEvent) => void);` | optional, inherited |  |
| `onGroupChange` | `onGroupChange?: ((event: DataGridGroupChangeEvent) => void);` | optional, inherited |  |
| `onBeforeGroupToggle` | `onBeforeGroupToggle?: ((event: DataGridGroupToggleEvent<Child>) => void);` | optional, inherited |  |
| `onGroupToggle` | `onGroupToggle?: ((event: DataGridGroupToggleEvent<Child>) => void);` | optional, inherited |  |
| `aggregates` | `aggregates?: readonly DataGridAggregateRow<Child>[];` | optional, inherited | Aggregate rows (or `<DataGridAggregateRow>` children). |
| `aggregateScope` | `aggregateScope?: "all" \| "page";` | optional, inherited | With paging: `page` (default) aggregates the current page, `all` every matching row. |
| `renderRow` | `renderRow?: ((ctx: DataGridRowContext<Child>) => ReactNode);` | optional, inherited |  |
| `renderEmpty` | `renderEmpty?: ((ctx: DataGridEmptyContext) => ReactNode);` | optional, inherited |  |
| `renderError` | `renderError?: ((ctx: DataGridDataErrorContext) => ReactNode);` | optional, inherited | Body content while the data source failed to load. Default: the error message and a Retry button. |
| `onViewChange` | `onViewChange?: ((event: DataGridViewChangeEvent) => void);` | optional, inherited | Once per committed change of the displayed rows; never on scroll, focus, selection, or expansion. |
| `getRowProps` | `getRowProps?: ((row: Child, rowIndex: number, ctx: { readonly tree?: DataGridTreeContext; }) => DataGridElementProps \| undefined);` | optional, inherited | Called for rendered rows only; `ctx.tree` in tree mode. |
| `rowClassName` | `rowClassName?: ((row: Child, rowIndex: number) => string \| undefined);` | optional, inherited |  |
| `getCellProps` | `getCellProps?: ((ctx: DataGridCellContext<Child>) => DataGridElementProps \| undefined);` | optional, inherited | Called for rendered cells only. |
| `className` | `className?: string;` | optional, inherited |  |
| `style` | `style?: CSSProperties;` | optional, inherited |  |
| `classNames` | `classNames?: Partial<Record<DataGridPart, string>>;` | optional, inherited |  |
| `styles` | `styles?: Partial<Record<DataGridPart, CSSProperties>>;` | optional, inherited |  |
| `icons` | `icons?: Partial<Record<DataGridIconName, ReactNode>>;` | optional, inherited | Icon overrides by name: a node replaces the built-in SVG icon, `null` hides it. Merges over an enclosing `DataGridIconsProvider`. A component prop, not a theme input. |
| `aria-label` | `aria-label?: string;` | optional, inherited |  |
| `aria-labelledby` | `aria-labelledby?: string;` | optional, inherited |  |
| `aria-describedby` | `aria-describedby?: string;` | optional, inherited |  |
| `onWarning` | `onWarning?: ((warning: DataGridWarning) => void);` | optional, inherited |  |
| `onReady` | `onReady?: ((api: DataGridApi<Child>) => void);` | optional, inherited | Fires once after the first commit with the instance. |
| `selection` | `selection?: boolean \| DataGridSelection;` | optional, inherited | Selection. On by default: single row selection. `false` turns it off. |
| `onBeforeSelectionChange` | `onBeforeSelectionChange?: ((event: DataGridSelectionChangeEvent<Child>) => void);` | optional, inherited | Cancel with `event.preventDefault()`. |
| `onSelectionChange` | `onSelectionChange?: ((event: DataGridSelectionChangeEvent<Child>) => void);` | optional, inherited |  |
| `keyBindings` | `keyBindings?: Readonly<Record<string, readonly string[]>>;` | optional, inherited | Replaces the combos of keyboard commands (`{ 'selection.selectAll': ['Mod+Shift+L'] }`). Reactive: a changed value (compared by value) rebuilds the keymap. |
| `onKeyDown` | `onKeyDown?: ((ctx: DataGridKeyDownContext) => void);` | optional, inherited | Called for every key pressed in the grid before the built-in binding runs. |
| `localeText` | `localeText?: DataGridLocaleText;` | optional, inherited | Text overrides over the English catalog (`DATA_GRID_DEFAULT_LOCALE_TEXT`): every visible and assistive string of the grid. Plain JSON with `{param}` templates and plural forms. Reactive. |
| `persistState` | `persistState?: boolean \| DataGridPersistState;` | optional, inherited | Saves the user's grid state (column order, widths, visibility, pinning, sorting, filters, grouping, page, search, selection, scroll) and restores it on mount. `true` uses `localStorage` under `salmon-data-grid:<id>` (set `id`); an object sets the key, storage, excluded parts, and an application version. Read on mount. |

### DataGridChildGridParent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridChildGridParent

```ts
interface DataGridChildGridParent<Parent> {
    readonly rowId: RowId;
    readonly row: Parent;
    readonly depth: number;
}
```

The parent row a child grid belongs to (factory form of `childGrid.data`).

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Parent;` |  |  |
| `depth` | `readonly depth: number;` |  | Depth of the child grid (1 for children of the root grid). |

### DataGridChromeApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridChromeApi

```ts
interface DataGridChromeApi {
    pinColumn(field: string, pinned: DataGridColumnPin | null): CommandResult;
    openColumnChooser(position?: {
        readonly x: number;
        readonly y: number;
    }): void;
    openColumnMenu(field: string): void;
    openFilterMenu(field: string): void;
    closeOverlays(): void;
    registerCommandHandler(command: DataGridUiCommand | (string & {}), handler: DataGridCommandHandler): () => void;
    runCommand(command: DataGridUiCommand | (string & {}), payload?: Readonly<Record<string, unknown>>): boolean;
    getHeaderElement(field: string): HTMLElement | null;
    getPartElement(part: DataGridPart): HTMLElement | null;
}
```

Members (9):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `pinColumn` | `pinColumn(field: string, pinned: DataGridColumnPin \| null): CommandResult;` |  | Pins a column (id or field) to a side or unpins it (`null`). |
| `openColumnChooser` | `openColumnChooser(position?: {     readonly x: number;     readonly y: number; }): void;` |  | Opens the column chooser; at the given viewport point, else at the grid start. |
| `openColumnMenu` | `openColumnMenu(field: string): void;` |  |  |
| `openFilterMenu` | `openFilterMenu(field: string): void;` |  |  |
| `closeOverlays` | `closeOverlays(): void;` |  | Closes any open menu, dialog, or chooser (focus returns to its invoker). |
| `registerCommandHandler` | `registerCommandHandler(command: DataGridUiCommand \| (string & {}), handler: DataGridCommandHandler): () => void;` |  | Registers the handler of a UI command (toolbar, menus); returns the unregister function. |
| `runCommand` | `runCommand(command: DataGridUiCommand \| (string & {}), payload?: Readonly<Record<string, unknown>>): boolean;` |  | Runs a UI command (handler, then a module command, else a dev warning). Returns true when handled. |
| `getHeaderElement` | `getHeaderElement(field: string): HTMLElement \| null;` |  | Header cell of a column (id or field); `null` outside the rendered window. |
| `getPartElement` | `getPartElement(part: DataGridPart): HTMLElement \| null;` |  | First rendered element of a part; `null` when it is not rendered. |

### DataGridChromeColumn

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridChromeColumn

```ts
interface DataGridChromeColumn<Row> extends DataGridSpanColumn<Row> {
    readonly menu?: boolean;
}
```

Chrome fields of `DataGridColumn`.

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `menu` | `readonly menu?: boolean;` | optional | Column menu button on this header. Default true when the grid `columnMenu` is on. |
| `colSpan` | `colSpan?: DataGridSpan<Row>;` | optional, inherited | Covers following visible columns of the same pin zone (clamped at a pin edge). |
| `rowSpan` | `rowSpan?: DataGridSpan<Row>;` | optional, inherited | Covers following rows, also under row virtualization; in tree mode a span ends at a parent boundary. |

### DataGridChromeProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridChromeProps

```ts
interface DataGridChromeProps<Row> {
    pinnedColumns?: DataGridPinnedColumns;
    stickyRows?: number;
    stickyBottomRows?: number;
    onBeforeColumnPinChange?: (event: DataGridColumnPinChangeEvent) => void;
    onColumnPinChange?: (event: DataGridColumnPinChangeEvent) => void;
    mergeCells?: DataGridMergeCells;
    columnMenu?: boolean | readonly (DataGridColumnMenuItemId | DataGridMenuItem)[];
    onBeforeColumnMenuOpen?: (event: DataGridColumnMenuOpenEvent<Row>) => void;
    onBeforeColumnMenuClose?: (event: DataGridColumnMenuCloseEvent<Row>) => void;
    onColumnMenuItemClick?: (event: DataGridColumnMenuItemClickEvent<Row>) => void;
    renderColumnMenu?: (ctx: DataGridColumnMenuContext<Row>) => ReactNode;
    columnChooser?: boolean | DataGridColumnChooser<Row>;
    onBeforeColumnChooserOpen?: (event: DataGridColumnChooserOpenEvent<Row>) => void;
    toolbar?: readonly (DataGridToolbarItemId | DataGridToolbarItem)[];
    onToolbarItemClick?: (event: DataGridToolbarItemClickEvent) => void;
    renderToolbar?: (ctx: DataGridToolbarContext<Row>) => ReactNode;
    contextMenu?: boolean | readonly (DataGridContextMenuItemId | DataGridMenuItem)[];
    onBeforeContextMenuOpen?: (event: DataGridContextMenuOpenEvent) => void;
    onBeforeContextMenuClose?: (event: DataGridContextMenuCloseEvent) => void;
    onContextMenuItemClick?: (event: DataGridContextMenuItemClickEvent<Row>) => void;
    renderContextMenu?: (ctx: DataGridContextMenuContext) => ReactNode;
    onColumnResizeStart?: (event: DataGridColumnResizeEvent) => void;
    onColumnResize?: (event: DataGridColumnResizeEvent) => void;
    onColumnResizeEnd?: (event: DataGridColumnResizeEvent) => void;
    onColumnDragStart?: (event: DataGridColumnDragEvent) => void;
    onColumnDrag?: (event: DataGridColumnDragEvent) => void;
    onColumnDrop?: (event: DataGridColumnDragEvent) => void;
}
```

Members (27):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `pinnedColumns` | `pinnedColumns?: DataGridPinnedColumns;` | optional | The first / last N visible columns are pinned. Reactive. |
| `stickyRows` | `stickyRows?: number;` | optional | The first N rows of the visible row model stick below the header. |
| `stickyBottomRows` | `stickyBottomRows?: number;` | optional | The last N rows of the visible row model stick above the footer. |
| `onBeforeColumnPinChange` | `onBeforeColumnPinChange?: (event: DataGridColumnPinChangeEvent) => void;` | optional |  |
| `onColumnPinChange` | `onColumnPinChange?: (event: DataGridColumnPinChangeEvent) => void;` | optional |  |
| `mergeCells` | `mergeCells?: DataGridMergeCells;` | optional | DataGrid-wide merging of equal adjacent values (row merging also works under row virtualization). |
| `columnMenu` | `columnMenu?: boolean \| readonly (DataGridColumnMenuItemId \| DataGridMenuItem)[];` | optional | Column menu; an array lists the items in order (built-in ids or custom items). `column.menu: false` opts a column out. |
| `onBeforeColumnMenuOpen` | `onBeforeColumnMenuOpen?: (event: DataGridColumnMenuOpenEvent<Row>) => void;` | optional |  |
| `onBeforeColumnMenuClose` | `onBeforeColumnMenuClose?: (event: DataGridColumnMenuCloseEvent<Row>) => void;` | optional |  |
| `onColumnMenuItemClick` | `onColumnMenuItemClick?: (event: DataGridColumnMenuItemClickEvent<Row>) => void;` | optional |  |
| `renderColumnMenu` | `renderColumnMenu?: (ctx: DataGridColumnMenuContext<Row>) => ReactNode;` | optional |  |
| `columnChooser` | `columnChooser?: boolean \| DataGridColumnChooser<Row>;` | optional |  |
| `onBeforeColumnChooserOpen` | `onBeforeColumnChooserOpen?: (event: DataGridColumnChooserOpenEvent<Row>) => void;` | optional |  |
| `toolbar` | `toolbar?: readonly (DataGridToolbarItemId \| DataGridToolbarItem)[];` | optional |  |
| `onToolbarItemClick` | `onToolbarItemClick?: (event: DataGridToolbarItemClickEvent) => void;` | optional |  |
| `renderToolbar` | `renderToolbar?: (ctx: DataGridToolbarContext<Row>) => ReactNode;` | optional |  |
| `contextMenu` | `contextMenu?: boolean \| readonly (DataGridContextMenuItemId \| DataGridMenuItem)[];` | optional | Context menu; an array lists the items in order. Items that do not apply to the target are dropped. |
| `onBeforeContextMenuOpen` | `onBeforeContextMenuOpen?: (event: DataGridContextMenuOpenEvent) => void;` | optional |  |
| `onBeforeContextMenuClose` | `onBeforeContextMenuClose?: (event: DataGridContextMenuCloseEvent) => void;` | optional |  |
| `onContextMenuItemClick` | `onContextMenuItemClick?: (event: DataGridContextMenuItemClickEvent<Row>) => void;` | optional |  |
| `renderContextMenu` | `renderContextMenu?: (ctx: DataGridContextMenuContext) => ReactNode;` | optional |  |
| `onColumnResizeStart` | `onColumnResizeStart?: (event: DataGridColumnResizeEvent) => void;` | optional |  |
| `onColumnResize` | `onColumnResize?: (event: DataGridColumnResizeEvent) => void;` | optional |  |
| `onColumnResizeEnd` | `onColumnResizeEnd?: (event: DataGridColumnResizeEvent) => void;` | optional |  |
| `onColumnDragStart` | `onColumnDragStart?: (event: DataGridColumnDragEvent) => void;` | optional |  |
| `onColumnDrag` | `onColumnDrag?: (event: DataGridColumnDragEvent) => void;` | optional |  |
| `onColumnDrop` | `onColumnDrop?: (event: DataGridColumnDragEvent) => void;` | optional |  |

### DataGridClipboardApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridClipboardApi

```ts
interface DataGridClipboardApi {
    copy(options?: DataGridCopyOptions): CommandResult;
    paste(text?: string): CommandResult;
}
```

Clipboard methods of the `DataGrid` instance. Need `editing` (it registers the clipboard module).

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `copy` | `copy(options?: DataGridCopyOptions): CommandResult;` |  | Copies the cell range, else the selected rows, else the focused cell to the system clipboard (drafts included). Falls back to a copy dialog when the browser blocks clipboard access. `rejected` with `nothingToCopy` or `cancelled` (`onBeforeCopy`). |
| `paste` | `paste(text?: string): CommandResult;` |  | Pastes TSV `text` at the selected range or focused cell. Without `text`, reads the system clipboard (`async`), or opens a paste dialog when the Clipboard API is unavailable. |

### DataGridClipboardCell

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridClipboardCell

```ts
interface DataGridClipboardCell {
    readonly rowId: RowId;
    readonly field: string;
}
```

A cell by row id and column id (`field`).

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `field` | `readonly field: string;` |  |  |

### DataGridClipboardProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridClipboardProps

```ts
interface DataGridClipboardProps {
    onBeforeCopy?: (event: DataGridBeforeCopyEvent) => void;
    onBeforePaste?: (event: DataGridBeforePasteEvent) => void;
    onBeforeFill?: (event: DataGridBeforeFillEvent) => void;
}
```

Clipboard and fill events of `DataGrid` (part of the editing props).

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `onBeforeCopy` | `onBeforeCopy?: (event: DataGridBeforeCopyEvent) => void;` | optional |  |
| `onBeforePaste` | `onBeforePaste?: (event: DataGridBeforePasteEvent) => void;` | optional |  |
| `onBeforeFill` | `onBeforeFill?: (event: DataGridBeforeFillEvent) => void;` | optional |  |

### DataGridColumnChooser

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnChooser

```ts
interface DataGridColumnChooser<Row = unknown> {
    readonly searchable?: boolean;
    readonly searchOperator?: 'contains' | 'startsWith' | 'endsWith' | 'equal';
    readonly ignoreAccents?: boolean;
    readonly debounce?: number;
    readonly mode?: 'confirm' | 'immediate';
    readonly renderChooser?: (ctx: DataGridColumnChooserContext<Row>) => ReactNode;
    readonly renderHeader?: (ctx: DataGridColumnChooserContext<Row>) => ReactNode;
    readonly renderFooter?: (ctx: DataGridColumnChooserContext<Row>) => ReactNode;
}
```

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `searchable` | `readonly searchable?: boolean;` | optional | Search box above the list (`enableSearching`). Default true. |
| `searchOperator` | `readonly searchOperator?: 'contains' \| 'startsWith' \| 'endsWith' \| 'equal';` | optional | Search operator (`columnChooserSettings.operator`). Default `contains`. |
| `ignoreAccents` | `readonly ignoreAccents?: boolean;` | optional | Search ignores diacritics (`ignoreAccent`): `"resume"` finds `"Résumé"`. Default false. |
| `debounce` | `readonly debounce?: number;` | optional | Delay in ms before typed search text filters the list (`immediateModeDelay`). Default 0. |
| `mode` | `readonly mode?: 'confirm' \| 'immediate';` | optional | `confirm` (default): OK applies, Cancel discards. `immediate`: every toggle applies. |
| `renderChooser` | `readonly renderChooser?: (ctx: DataGridColumnChooserContext<Row>) => ReactNode;` | optional | Replaces the search box and the column list (`template`, `renderCustomColumnChooser`); `defaultContent` is the built-in. |
| `renderHeader` | `readonly renderHeader?: (ctx: DataGridColumnChooserContext<Row>) => ReactNode;` | optional | Content above the search box (`headerTemplate`). |
| `renderFooter` | `readonly renderFooter?: (ctx: DataGridColumnChooserContext<Row>) => ReactNode;` | optional | Replaces the OK / Cancel buttons (`footerTemplate`); `defaultContent` is the built-in buttons. |

### DataGridColumnChooserContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnChooserContext

```ts
interface DataGridColumnChooserContext<Row = unknown> {
    readonly columns: readonly DataGridColumnChooserItem<Row>[];
    readonly searchText: string;
    setSearchText(text: string): void;
    setHidden(fields: string | readonly string[], hidden: boolean): void;
    apply(): void;
    close(): void;
    readonly defaultContent: ReactNode;
}
```

Context of `columnChooser.renderChooser`, `renderHeader`, and `renderFooter`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `columns` | `readonly columns: readonly DataGridColumnChooserItem<Row>[];` |  | Hideable leaf columns in definition order. |
| `searchText` | `readonly searchText: string;` |  | Current search text (empty without `searchable`). |
| `setSearchText` | `setSearchText(text: string): void;` |  |  |
| `setHidden` | `setHidden(fields: string \| readonly string[], hidden: boolean): void;` |  | Updates the draft visibility (immediate mode applies it at once). At least one column stays visible. |
| `apply` | `apply(): void;` |  | Applies the draft and closes (the OK button). |
| `close` | `close(): void;` |  | Discards the draft and closes. |
| `defaultContent` | `readonly defaultContent: ReactNode;` |  | The built-in content the render prop replaces (search box and list, or the OK / Cancel buttons). |

### DataGridColumnChooserItem

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnChooserItem

```ts
interface DataGridColumnChooserItem<Row = unknown> {
    readonly field: string;
    readonly header: string;
    readonly hidden: boolean;
    readonly matches: boolean;
    readonly column: DataGridColumnInfo<Row>;
}
```

One listed column of the column chooser.

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  | Column key. |
| `header` | `readonly header: string;` |  |  |
| `hidden` | `readonly hidden: boolean;` |  | Draft visibility (applied on OK, or at once with `mode: 'immediate'`). |
| `matches` | `readonly matches: boolean;` |  | Shown by the current search text. |
| `column` | `readonly column: DataGridColumnInfo<Row>;` |  |  |

### DataGridColumnChooserOpenEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnChooserOpenEvent

```ts
interface DataGridColumnChooserOpenEvent<Row> extends DataGridEvent {
    readonly columns: readonly DataGridColumnInfo<Row>[];
}
```

`onBeforeColumnChooserOpen` (cancellable).

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `columns` | `readonly columns: readonly DataGridColumnInfo<Row>[];` |  |  |
| `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). |

### DataGridColumnDragEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnDragEvent

```ts
interface DataGridColumnDragEvent extends DataGridEvent {
    readonly field: string;
    readonly fromIndex: number;
    readonly toIndex: number;
}
```

`onColumnDragStart` / `onColumnDrag` (per frame) / `onColumnDrop`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `fromIndex` | `readonly fromIndex: number;` |  |  |
| `toIndex` | `readonly toIndex: number;` |  | Proposed visible index (-1 when the current drop target is invalid). |
| `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). |

### DataGridColumnFilter

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnFilter

```ts
interface DataGridColumnFilter {
    ui?: DataGridFilterUi;
    operator?: DataGridFilterOperator;
    operators?: readonly DataGridFilterOperator[];
    editorProps?: Readonly<Record<string, unknown>>;
}
```

Column `filter`: per-column UI, default operator, and offered operators.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `ui` | `ui?: DataGridFilterUi;` | optional |  |
| `operator` | `operator?: DataGridFilterOperator;` | optional |  |
| `operators` | `operators?: readonly DataGridFilterOperator[];` | optional |  |
| `editorProps` | `editorProps?: Readonly<Record<string, unknown>>;` | optional | Attributes of the built-in value editors of this column: `placeholder`, `min`, `max`, `step`, `inputMode`, `aria-*`, `data-*`, `className`, `style`, ... Value, type, ref, and event handlers stay the grid's. `renderFilter` / `renderFilterCell` receive them as `editorProps`. |

### DataGridColumnInfo

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnInfo

```ts
interface DataGridColumnInfo<Row = unknown> {
    readonly id: string;
    readonly field: string | null;
    readonly header: string;
    readonly type: ColumnType;
    readonly format: string | FormatOptions | undefined;
    readonly align: 'start' | 'center' | 'end' | 'justify' | undefined;
    readonly headerAlign: 'start' | 'center' | 'end' | undefined;
    readonly width: ColumnWidth;
    readonly minWidth: number;
    readonly maxWidth: number;
    readonly pinned: 'start' | 'end' | 'center' | null;
    readonly hidden: boolean;
    readonly sortable: boolean;
    readonly filterable: boolean;
    readonly searchable: boolean;
    readonly groupable: boolean;
    readonly editable: boolean;
    readonly resizable: boolean;
    readonly reorderable: boolean;
    readonly hideable: boolean;
    readonly primaryKey: boolean;
    readonly lockPosition: boolean;
    readonly displayAsCheckbox: boolean;
    readonly leaf: boolean;
    readonly depth: number;
    readonly path: readonly string[];
    readonly children: readonly string[];
    readonly definition: Readonly<Record<string, unknown>>;
    getValue(row: Row): unknown;
    formatValue(value: unknown, row: Row): string;
}
```

Read-only public view of a compiled column, as render props and events
receive it. Field names follow the name table; flags carry their resolved
defaults. Values are the definition's (runtime visibility, width, order,
and pin state are in `api.getState()` and the column events).

Members (30):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id: string;` |  | The column key: `id`, else `field`, else a generated id. Payloads call it `field`. |
| `field` | `readonly field: string \| null;` |  | The data field (dot path), or null for columns without one. |
| `header` | `readonly header: string;` |  |  |
| `type` | `readonly type: ColumnType;` |  |  |
| `format` | `readonly format: string \| FormatOptions \| undefined;` |  |  |
| `align` | `readonly align: 'start' \| 'center' \| 'end' \| 'justify' \| undefined;` |  |  |
| `headerAlign` | `readonly headerAlign: 'start' \| 'center' \| 'end' \| undefined;` |  |  |
| `width` | `readonly width: ColumnWidth;` |  |  |
| `minWidth` | `readonly minWidth: number;` |  |  |
| `maxWidth` | `readonly maxWidth: number;` |  | `Infinity` when unbounded. |
| `pinned` | `readonly pinned: 'start' \| 'end' \| 'center' \| null;` |  | Definition pin side. |
| `hidden` | `readonly hidden: boolean;` |  | Definition visibility. |
| `sortable` | `readonly sortable: boolean;` |  |  |
| `filterable` | `readonly filterable: boolean;` |  |  |
| `searchable` | `readonly searchable: boolean;` |  |  |
| `groupable` | `readonly groupable: boolean;` |  |  |
| `editable` | `readonly editable: boolean;` |  |  |
| `resizable` | `readonly resizable: boolean;` |  |  |
| `reorderable` | `readonly reorderable: boolean;` |  |  |
| `hideable` | `readonly hideable: boolean;` |  | Listed in the column chooser. |
| `primaryKey` | `readonly primaryKey: boolean;` |  |  |
| `lockPosition` | `readonly lockPosition: boolean;` |  |  |
| `displayAsCheckbox` | `readonly displayAsCheckbox: boolean;` |  |  |
| `leaf` | `readonly leaf: boolean;` |  | False for stacked header groups. |
| `depth` | `readonly depth: number;` |  | Header depth (0 for top level). |
| `path` | `readonly path: readonly string[];` |  | Stacked header group ids, root first, ending with this column. |
| `children` | `readonly children: readonly string[];` |  | Child column ids of a stacked header group. |
| `definition` | `readonly definition: Readonly<Record<string, unknown>>;` |  | The column definition as given (`columns` entry or `<DataGridColumn>` props). |
| `getValue` | `getValue(row: Row): unknown;` |  | The column value of a row (`valueGetter`, else `field`). |
| `formatValue` | `formatValue(value: unknown, row: Row): string;` |  | The display text of a value (`valueFormatter`, else `format`). |

### DataGridColumnMenuCloseEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnMenuCloseEvent

```ts
interface DataGridColumnMenuCloseEvent<Row> extends DataGridEvent {
    readonly field: string;
    readonly column: DataGridColumnInfo<Row>;
}
```

`onBeforeColumnMenuClose` (cancellable: the menu stays open).

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row>;` |  |  |
| `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). |

### DataGridColumnMenuContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnMenuContext

```ts
interface DataGridColumnMenuContext<Row> {
    readonly field: string;
    readonly column: DataGridColumnInfo<Row>;
    readonly items: readonly DataGridMenuItem[];
    readonly defaultMenu: ReactNode;
    readonly close: () => void;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row>;` |  |  |
| `items` | `readonly items: readonly DataGridMenuItem[];` |  |  |
| `defaultMenu` | `readonly defaultMenu: ReactNode;` |  |  |
| `close` | `readonly close: () => void;` |  |  |

### DataGridColumnMenuItemClickEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnMenuItemClickEvent

```ts
interface DataGridColumnMenuItemClickEvent<Row> extends DataGridEvent {
    readonly item: DataGridMenuItem;
    readonly field: string;
    readonly column: DataGridColumnInfo<Row>;
}
```

`onColumnMenuItemClick`; `preventDefault()` skips the built-in action.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `item` | `readonly item: DataGridMenuItem;` |  |  |
| `field` | `readonly field: string;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row>;` |  |  |
| `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). |

### DataGridColumnMenuOpenEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnMenuOpenEvent

```ts
interface DataGridColumnMenuOpenEvent<Row> extends DataGridEvent {
    readonly field: string;
    readonly column: DataGridColumnInfo<Row>;
    readonly items: DataGridMenuItem[];
}
```

`onBeforeColumnMenuOpen` (cancellable: the menu stays closed).

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row>;` |  |  |
| `items` | `readonly items: DataGridMenuItem[];` |  | Mutable copy of the resolved items; edit the array in place (`splice`, `push`) to hide or add items for this column. The field itself is read-only. |
| `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). |

### DataGridColumnPinChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnPinChangeEvent

```ts
interface DataGridColumnPinChangeEvent extends DataGridEvent {
    readonly field: string;
    readonly pinned: DataGridColumnPin | null;
    readonly previousPinned: DataGridColumnPin | null;
}
```

`onBeforeColumnPinChange` (cancellable) / `onColumnPinChange`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `pinned` | `readonly pinned: DataGridColumnPin \| null;` |  | Proposed (before) or applied (after) side; `null` unpins. |
| `previousPinned` | `readonly previousPinned: DataGridColumnPin \| null;` |  |  |
| `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). |

### DataGridColumnReorderEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnReorderEvent

```ts
interface DataGridColumnReorderEvent extends DataGridEvent {
    readonly field: string;
    readonly fromIndex: number;
    readonly toIndex: number;
}
```

`onBeforeColumnReorder` (cancellable) / `onColumnReorder`, raised for every column move.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `fromIndex` | `readonly fromIndex: number;` |  |  |
| `toIndex` | `readonly toIndex: 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). |

### DataGridColumnResizeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnResizeEvent

```ts
interface DataGridColumnResizeEvent extends DataGridEvent {
    readonly field: string;
    readonly width: number;
    readonly previousWidth: number;
}
```

`onColumnResizeStart` (cancellable) / `onColumnResize` (per frame) / `onColumnResizeEnd`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `width` | `readonly width: number;` |  | Width in px (live during the drag; committed on end). |
| `previousWidth` | `readonly previousWidth: number;` |  | Width in px when the resize started. |
| `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). |

### DataGridColumnVisibilityChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnVisibilityChangeEvent

```ts
interface DataGridColumnVisibilityChangeEvent extends DataGridEvent {
    readonly hidden: readonly string[];
    readonly shown: readonly string[];
}
```

`onBeforeColumnVisibilityChange` (cancellable) / `onColumnVisibilityChange`.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `hidden` | `readonly hidden: readonly string[];` |  |  |
| `shown` | `readonly shown: readonly string[];` |  |  |
| `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). |

### DataGridCommandClickEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCommandClickEvent

```ts
interface DataGridCommandClickEvent<Row> extends DataGridEvent {
    readonly command: DataGridCommandItem<Row>;
    readonly rowId: RowId;
    readonly row: Row | undefined;
}
```

`onCommandClick`: `preventDefault()` cancels the built-in command.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `command` | `readonly command: DataGridCommandItem<Row>;` |  |  |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row \| undefined;` |  |  |
| `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). |

### DataGridCommandItem

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCommandItem

```ts
interface DataGridCommandItem<Row = unknown> {
    readonly type: 'edit' | 'delete' | 'save' | 'cancel' | 'custom';
    readonly label?: string;
    readonly icon?: ReactNode;
    readonly title?: string;
    readonly onClick?: (ctx: {
        readonly rowId: RowId;
        readonly row: Row;
    }) => void;
}
```

One button of a command column.

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `readonly type: 'edit' \| 'delete' \| 'save' \| 'cancel' \| 'custom';` |  |  |
| `label` | `readonly label?: string;` | optional | Visible text. Default: the localized command name. |
| `icon` | `readonly icon?: ReactNode;` | optional | Icon content rendered before the label. |
| `title` | `readonly title?: string;` | optional | `title` tooltip (also the accessible name when `label` is empty). |
| `onClick` | `readonly onClick?: (ctx: {     readonly rowId: RowId;     readonly row: Row; }) => void;` | optional | `custom` commands: called on click (after `onCommandClick`). |

### DataGridContextMenuCloseEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridContextMenuCloseEvent

```ts
interface DataGridContextMenuCloseEvent extends DataGridEvent {
    readonly target: DataGridContextMenuTarget;
}
```

`onBeforeContextMenuClose` (cancellable: the menu stays open).

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `target` | `readonly target: DataGridContextMenuTarget;` |  |  |
| `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). |

### DataGridContextMenuContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridContextMenuContext

```ts
interface DataGridContextMenuContext {
    readonly target: DataGridContextMenuTarget;
    readonly items: readonly DataGridMenuItem[];
    readonly defaultMenu: ReactNode;
    readonly close: () => void;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `target` | `readonly target: DataGridContextMenuTarget;` |  |  |
| `items` | `readonly items: readonly DataGridMenuItem[];` |  |  |
| `defaultMenu` | `readonly defaultMenu: ReactNode;` |  |  |
| `close` | `readonly close: () => void;` |  |  |

### DataGridContextMenuItemClickEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridContextMenuItemClickEvent

```ts
interface DataGridContextMenuItemClickEvent<Row> extends DataGridEvent {
    readonly item: DataGridMenuItem;
    readonly target: DataGridContextMenuTarget;
    readonly rowIds: readonly RowId[];
    rows(): readonly Row[];
}
```

`onContextMenuItemClick`; `preventDefault()` skips the built-in action.

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `item` | `readonly item: DataGridMenuItem;` |  |  |
| `target` | `readonly target: DataGridContextMenuTarget;` |  |  |
| `rowIds` | `readonly rowIds: readonly RowId[];` |  | The target row, or the selection when the target row is selected; empty for header and pager targets. Lazy. |
| `rows` | `rows(): readonly Row[];` |  | Row objects of `rowIds`. |
| `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). |

### DataGridContextMenuOpenEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridContextMenuOpenEvent

```ts
interface DataGridContextMenuOpenEvent extends DataGridEvent {
    readonly target: DataGridContextMenuTarget;
    readonly items: DataGridMenuItem[];
}
```

`onBeforeContextMenuOpen` (cancellable).

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `target` | `readonly target: DataGridContextMenuTarget;` |  |  |
| `items` | `readonly items: DataGridMenuItem[];` |  | Mutable copy of the resolved items; edit the array in place (`splice`, `push`). The field itself is read-only. |
| `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). |

### DataGridCopyOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCopyOptions

```ts
interface DataGridCopyOptions {
    readonly includeHeaders?: boolean;
    readonly copyFormatted?: boolean;
}
```

`copy(options)`.

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `includeHeaders` | `readonly includeHeaders?: boolean;` | optional | Prepend the header texts as the first TSV line (Ctrl+Shift+H). Default false. |
| `copyFormatted` | `readonly copyFormatted?: boolean;` | optional | `false` copies raw values instead of the display text (engine `clipboard.copyFormatted`). `column.clipboardFormatter` always wins. Default true. |

### DataGridCoreApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCoreApi

```ts
interface DataGridApi<Row> {
    readonly engine: DataGridEngine<Row>;
    getColumn(fieldOrId: string): CompiledColumn<Row> | undefined;
    getColumns(): readonly CompiledColumn<Row>[];
    getVisibleColumns(): readonly CompiledColumn<Row>[];
    getHiddenColumns(): readonly CompiledColumn<Row>[];
    getColumnAt(index: number): CompiledColumn<Row> | undefined;
    getColumnIndex(fieldOrId: string): number;
    showColumns(fieldsOrIds: string | readonly string[]): CommandResult;
    hideColumns(fieldsOrIds: string | readonly string[]): CommandResult;
    getViewRows(): readonly Row[];
    getFilteredRows(): readonly Row[];
    getRow(rowId: RowId): Row | undefined;
    getRowInfo(rowId: RowId): RowSnapshot<Row> | undefined;
    getRowIndex(rowId: RowId): number;
    getRowIdAt(index: number): RowId | undefined;
    getCell(rowId: RowId, field: string): CellSnapshot | undefined;
    getDataSource(): DataSource<Row>;
    getPrimaryKeyFields(): readonly string[];
    sortColumn(field: string, direction: 'asc' | 'desc', options?: {
        readonly multiple?: boolean;
    }): CommandResult;
    removeSort(field: string): CommandResult;
    clearSorting(): CommandResult;
    filterColumn(field: string, operator: string, value: Json, options?: FilterColumnOptions): CommandResult;
    clearFiltering(fields?: string | readonly string[]): CommandResult;
    removeFilter(field: string): CommandResult;
    getColumnFacet(field: string, options?: FacetOptions): ColumnFacet | undefined;
    search(text: string): CommandResult;
    clearSearch(): CommandResult;
    goToPage(page: number): CommandResult;
    setPageSize(pageSize: number): CommandResult;
    getPageInfo(): PageInfo | undefined;
    groupColumn(field: string, index?: number): CommandResult;
    ungroupColumn(field: string): CommandResult;
    clearGrouping(): CommandResult;
    toggleGroup(group: GroupTarget, expanded?: boolean): CommandResult;
    expandAllGroups(): CommandResult;
    collapseAllGroups(): CommandResult;
    getGroup(rowId: RowId): GroupRowSnapshot | undefined;
    getAggregates(groupId?: RowId): AggregateValues | undefined;
    refresh(): void;
    dispose(): void;
}
```

Imperative DataGrid API over an engine (re-exported by `@salmonui/data-grid` as
`DataGridCoreApi` and extended there). Every method that takes a column accepts
a `field` or a column id: the column id wins, else the first leaf with that
`field`. Mutating methods dispatch a serializable command and return its
`CommandResult`; read methods return engine-owned frozen values or raw row
references.

Members (40):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `engine` | `readonly engine: DataGridEngine<Row>;` |  |  |
| `getColumn` | `getColumn(fieldOrId: string): CompiledColumn<Row> \| undefined;` |  | Leaf column by column id, else the first leaf with that `field`. |
| `getColumns` | `getColumns(): readonly CompiledColumn<Row>[];` |  | Every leaf column in definition order, including hidden ones. |
| `getVisibleColumns` | `getVisibleColumns(): readonly CompiledColumn<Row>[];` |  | Visible leaves in runtime order. |
| `getHiddenColumns` | `getHiddenColumns(): readonly CompiledColumn<Row>[];` |  | Leaves hidden at runtime, in definition order. |
| `getColumnAt` | `getColumnAt(index: number): CompiledColumn<Row> \| undefined;` |  | Visible leaf at an index of `getVisibleColumns()`. |
| `getColumnIndex` | `getColumnIndex(fieldOrId: string): number;` |  | Index of a column in `getVisibleColumns()`, or -1. |
| `showColumns` | `showColumns(fieldsOrIds: string \| readonly string[]): CommandResult;` |  |  |
| `hideColumns` | `hideColumns(fieldsOrIds: string \| readonly string[]): CommandResult;` |  |  |
| `getViewRows` | `getViewRows(): readonly Row[];` |  | Rows of the current view (after the query pipeline), as raw references. |
| `getFilteredRows` | `getFilteredRows(): readonly Row[];` |  | Rows passing search and every filter, in sort order, across every page, as raw references. Without the `filter` module, every row. |
| `getRow` | `getRow(rowId: RowId): Row \| undefined;` |  |  |
| `getRowInfo` | `getRowInfo(rowId: RowId): RowSnapshot<Row> \| undefined;` |  |  |
| `getRowIndex` | `getRowIndex(rowId: RowId): number;` |  | Visible index of a row, or -1. |
| `getRowIdAt` | `getRowIdAt(index: number): RowId \| undefined;` |  | Row id at a visible index (the inverse of `getRowIndex`), or undefined. |
| `getCell` | `getCell(rowId: RowId, field: string): CellSnapshot \| undefined;` |  |  |
| `getDataSource` | `getDataSource(): DataSource<Row>;` |  |  |
| `getPrimaryKeyFields` | `getPrimaryKeyFields(): readonly string[];` |  | `field` of each `primaryKey` leaf column, in column order. |
| `sortColumn` | `sortColumn(field: string, direction: 'asc' \| 'desc', options?: {     readonly multiple?: boolean; }): CommandResult;` |  | `multiple` adds to the current sort (Ctrl+click). Needs the `sort` module. |
| `removeSort` | `removeSort(field: string): CommandResult;` |  |  |
| `clearSorting` | `clearSorting(): CommandResult;` |  |  |
| `filterColumn` | `filterColumn(field: string, operator: string, value: Json, options?: FilterColumnOptions): CommandResult;` |  | An array value with a scalar operator ORs one condition per value. Needs the `filter` module. |
| `clearFiltering` | `clearFiltering(fields?: string \| readonly string[]): CommandResult;` |  | Clears every filter, or the filters of the given columns. |
| `removeFilter` | `removeFilter(field: string): CommandResult;` |  |  |
| `getColumnFacet` | `getColumnFacet(field: string, options?: FacetOptions): ColumnFacet \| undefined;` |  | Distinct values with counts for checkbox / Excel filters, or undefined without the `filter` module. |
| `search` | `search(text: string): CommandResult;` |  | Searches with the `search` module settings; empty text clears the search. |
| `clearSearch` | `clearSearch(): CommandResult;` |  |  |
| `goToPage` | `goToPage(page: number): CommandResult;` |  | Needs the `paging` module. |
| `setPageSize` | `setPageSize(pageSize: number): CommandResult;` |  |  |
| `getPageInfo` | `getPageInfo(): PageInfo \| undefined;` |  | Pager model, or undefined without the `paging` module. |
| `groupColumn` | `groupColumn(field: string, index?: number): CommandResult;` |  | Needs the `grouping` module. |
| `ungroupColumn` | `ungroupColumn(field: string): CommandResult;` |  |  |
| `clearGrouping` | `clearGrouping(): CommandResult;` |  |  |
| `toggleGroup` | `toggleGroup(group: GroupTarget, expanded?: boolean): CommandResult;` |  | Toggles (or sets) one group by row id, path key, or path. |
| `expandAllGroups` | `expandAllGroups(): CommandResult;` |  |  |
| `collapseAllGroups` | `collapseAllGroups(): CommandResult;` |  |  |
| `getGroup` | `getGroup(rowId: RowId): GroupRowSnapshot \| undefined;` |  | Caption or footer snapshot of a group row id, or undefined. |
| `getAggregates` | `getAggregates(groupId?: RowId): AggregateValues \| undefined;` |  | Without an argument the footer aggregates (undefined without the `aggregates` module); with a group row id that group's aggregates (undefined for an unknown id). |
| `refresh` | `refresh(): void;` |  | Re-reads the data with the current query and keeps the grid state: `engine.refresh()`. |
| `dispose` | `dispose(): void;` |  |  |

### DataGridCsvExportOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCsvExportOptions

```ts
interface DataGridCsvExportOptions<Row> extends DataGridExportOptions<Row>, CsvOptions {
}
```

Members (22):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `delimiter` | `delimiter?: string;` | optional, inherited | Default `,`. |
| `lineBreak` | `lineBreak?: string;` | optional, inherited | Default `\r\n` (RFC 4180). |
| `includeHeaders` | `includeHeaders?: boolean;` | optional, inherited | Header line with the leaf header texts. Default true. |
| `values` | `values?: "formatted" \| "raw";` | optional, inherited | `formatted` (default): the column display text. `raw`: numbers and booleans as is, dates as ISO 8601. |
| `aggregateRows` | `aggregateRows?: boolean;` | optional, inherited | Group caption, group footer, and grid footer aggregate lines. Default true. |
| `bom` | `bom?: boolean;` | optional, inherited | Prefix a UTF-8 byte order mark (Excel detects UTF-8). Default false. |
| `quoteAll` | `quoteAll?: boolean;` | optional, inherited | Quote every field instead of only those that need it. Default false. |
| `escapeFormulas` | `escapeFormulas?: boolean;` | optional, inherited | Neutralize spreadsheet formulas in text cells: a leading `'` on tab, CR, or `=`, `+`, `-`, `@` after optional whitespace. Real numbers are kept. Default true; `false` writes raw text. |
| `treeDepthColumn` | `treeDepthColumn?: string \| boolean;` | optional, inherited | Tree mode: a leading column with each row's tree depth (0 for roots). `true` names it `Depth`; a string is the header text. Ignored outside tree mode. |
| `pages` | `pages?: "all" \| "current";` | optional, inherited | `all` (default): every page of the current query. `current`: the current page as shown. |
| `includeHiddenColumns` | `includeHiddenColumns?: boolean;` | optional, inherited | Include hidden columns. Default false. |
| `rows` | `rows?: readonly Row[];` | optional, inherited | Rows to export instead of the grid rows (for example the selected rows), with the grid's columns. |
| `columns` | `columns?: readonly ExportColumnOption[];` | optional, inherited | Export-only columns, in order. |
| `fileName` | `fileName?: string;` | optional, inherited | Download name; the format extension is added when missing. Default `export`. |
| `hierarchy` | `hierarchy?: "all" \| "expanded" \| "none";` | optional, inherited | Detail and child-grid rows: `expanded` (default), `all`, or `none`. |
| `tree` | `tree?: "all" \| "expanded";` | optional, inherited | Tree mode rows: `expanded` (default) exports the visible rows in pre-order; `all` exports every kept row regardless of expansion (XLSX `outlineCollapsed` then keeps the collapsed state). |
| `cell` | `cell?: ((ctx: ExportCellHookContext<Row>) => void \| ExportCellPatch \| null \| undefined);` | optional, inherited | Per data cell. Not called when unset. |
| `headerCell` | `headerCell?: ((ctx: ExportHeaderCellHookContext<Row>) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per header cell. |
| `aggregateCell` | `aggregateCell?: ((ctx: ExportAggregateCellHookContext) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per aggregate cell (grid footer, group footer, group caption). |
| `groupCaption` | `groupCaption?: ((ctx: ExportGroupCaptionHookContext) => void \| string \| null \| undefined);` | optional, inherited | Group caption text. |
| `detail` | `detail?: ((ctx: ExportDetailContext<Row>) => void \| ExportDetail \| null \| undefined);` | optional, inherited | A detail block written after a data row (text lines or a child table), or null for none. |
| `download` | `download?: boolean;` | optional, inherited | Downloads the file (default true); `false` only resolves it. |

### DataGridDataErrorContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDataErrorContext

```ts
interface DataGridDataErrorContext {
    readonly error: unknown;
    readonly message: string;
    retry(): void;
}
```

Context of `renderError` (the data source failed to load).

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `error` | `readonly error: unknown;` |  |  |
| `message` | `readonly message: string;` |  | `error.message` when the error is an `Error`, else its string form. |
| `retry` | `retry(): void;` |  | Re-reads the data source with the current query. |

### DataGridDataUiApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDataUiApi

```ts
interface DataGridDataUiApi {
    setLoading(loading: boolean): void;
}
```

`DataGridApi` methods of the data-state UI.

Members (1):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `setLoading` | `setLoading(loading: boolean): void;` |  | Shows the loading indicator until `setLoading(false)`. A data load in progress shows it regardless. |

### DataGridDataUiProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDataUiProps

```ts
interface DataGridDataUiProps<Row> {
    loadingIndicator?: 'spinner' | 'skeleton';
    renderLoading?: (ctx: DataGridLoadingContext) => ReactNode;
    onRowClick?: (event: DataGridRowClickEvent<Row>) => void;
    onRowDoubleClick?: (event: DataGridRowClickEvent<Row>) => void;
    onCellClick?: (event: DataGridCellClickEvent<Row>) => void;
    onCellDoubleClick?: (event: DataGridCellClickEvent<Row>) => void;
    recordCommands?: boolean;
    instrument?: boolean;
}
```

`DataGrid` props of the data-state UI, the click events, and the engine dev tooling.

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `loadingIndicator` | `loadingIndicator?: 'spinner' \| 'skeleton';` | optional | Built-in loading indicator. Default `spinner`. |
| `renderLoading` | `renderLoading?: (ctx: DataGridLoadingContext) => ReactNode;` | optional | Replaces the content of the loading indicator (presentational: the grid announces loading itself). |
| `onRowClick` | `onRowClick?: (event: DataGridRowClickEvent<Row>) => void;` | optional | A data row was clicked. `preventDefault()` skips the built-in selection and focus. |
| `onRowDoubleClick` | `onRowDoubleClick?: (event: DataGridRowClickEvent<Row>) => void;` | optional | A data row was double-clicked. `preventDefault()` skips the built-in edit start. |
| `onCellClick` | `onCellClick?: (event: DataGridCellClickEvent<Row>) => void;` | optional | A cell of a data row was clicked; fires before `onRowClick`. |
| `onCellDoubleClick` | `onCellDoubleClick?: (event: DataGridCellClickEvent<Row>) => void;` | optional | A cell of a data row was double-clicked; fires before `onRowDoubleClick`. |
| `recordCommands` | `recordCommands?: boolean;` | optional | Keeps a serializable log of applied commands (`api.engine.getCommandLog()`). Initial only. Default false. |
| `instrument` | `instrument?: boolean;` | optional | Exposes store counters (`api.engine.getInstrumentation()`). Initial only. Default false. |

### DataGridDefaultCellProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDefaultCellProps

```ts
interface DataGridDefaultCellProps<Row = unknown> {
    column: DataGridColumnInfo<Row>;
    value: unknown;
    formattedValue: string;
}
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `column` | `column: DataGridColumnInfo<Row>;` |  | The render context's `column`. |
| `value` | `value: unknown;` |  |  |
| `formattedValue` | `formattedValue: string;` |  |  |

### DataGridDeleteEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDeleteEvent

```ts
interface DataGridDeleteEvent<Row> extends DataGridEvent {
    readonly rowIds: readonly RowId[];
    rows(): readonly Row[];
    readonly mode: EditMode;
}
```

`onBeforeDelete` / `onDelete`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowIds` | `readonly rowIds: readonly RowId[];` |  |  |
| `rows` | `rows(): readonly Row[];` |  |  |
| `mode` | `readonly mode: EditMode;` |  | Batch mode only marks the rows until save. |
| `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). |

### DataGridDetailApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDetailApi

```ts
interface DataGridDetailApi {
    expandDetail(rowId: RowId): DataGridActionResult;
    collapseDetail(rowId: RowId): DataGridActionResult;
    toggleDetail(rowId: RowId, expanded?: boolean): DataGridActionResult;
    expandAllDetails(): DataGridActionResult;
    collapseAllDetails(): DataGridActionResult;
    isDetailExpanded(rowId: RowId): boolean;
    getChildGrid(rowId: RowId): DataGridApi<unknown> | null;
    moveRows(rowIds: RowId | readonly RowId[], to: number | DataGridMoveTarget): DataGridActionResult;
}
```

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `expandDetail` | `expandDetail(rowId: RowId): DataGridActionResult;` |  |  |
| `collapseDetail` | `collapseDetail(rowId: RowId): DataGridActionResult;` |  |  |
| `toggleDetail` | `toggleDetail(rowId: RowId, expanded?: boolean): DataGridActionResult;` |  | Toggles one detail row; `expanded` forces a state. |
| `expandAllDetails` | `expandAllDetails(): DataGridActionResult;` |  |  |
| `collapseAllDetails` | `collapseAllDetails(): DataGridActionResult;` |  |  |
| `isDetailExpanded` | `isDetailExpanded(rowId: RowId): boolean;` |  |  |
| `getChildGrid` | `getChildGrid(rowId: RowId): DataGridApi<unknown> \| null;` |  | The mounted child grid of a parent row (null when collapsed or not rendered). |
| `moveRows` | `moveRows(rowIds: RowId \| readonly RowId[], to: number \| DataGridMoveTarget): DataGridActionResult;` |  | Moves rows so the first one ends at data row index `toIndex`, or next to / into a target row (`{ targetRowId, position }`; `into` makes them the last children of the target in tree mode). |

### DataGridDetailContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDetailContext

```ts
interface DataGridDetailContext<Row> {
    readonly row: Row;
    readonly rowId: RowId;
    readonly collapse: () => void;
    readonly status: DataGridDetailStatus;
    readonly data: unknown;
    readonly error: unknown;
    readonly retry: () => void;
}
```

Context of `renderDetail`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `row` | `readonly row: Row;` |  |  |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `collapse` | `readonly collapse: () => void;` |  | Collapses this detail row. |
| `status` | `readonly status: DataGridDetailStatus;` |  | `loadDetail` state; `ready` without a loader. |
| `data` | `readonly data: unknown;` |  | The value `loadDetail` resolved to. |
| `error` | `readonly error: unknown;` |  |  |
| `retry` | `readonly retry: () => void;` |  | Loads the detail content again (after an error). |

### DataGridDetailLoadContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDetailLoadContext

```ts
interface DataGridDetailLoadContext<Row> {
    readonly rowId: RowId;
    readonly row: Row;
    readonly signal: AbortSignal;
}
```

Context of `loadDetail`.

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row;` |  |  |
| `signal` | `readonly signal: AbortSignal;` |  | Aborted when the row object is replaced or the grid unmounts. |

### DataGridDetailProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDetailProps

```ts
interface DataGridDetailProps<Row> {
    renderDetail?: (ctx: DataGridDetailContext<Row>) => ReactNode;
    detailHeight?: number;
    hasDetail?: (row: Row) => boolean;
    loadDetail?: (ctx: DataGridDetailLoadContext<Row>) => unknown;
    defaultExpandedDetails?: boolean | readonly RowId[];
    childGrid?: DataGridChildGrid<unknown, Row>;
    onBeforeDetailToggle?: (event: DataGridDetailToggleEvent<Row>) => void;
    onDetailToggle?: (event: DataGridDetailToggleEvent<Row>) => void;
    rowDrag?: boolean | DataGridRowDrag;
    onRowDragStart?: (event: DataGridRowDragEvent<Row>) => void;
    onRowDrag?: (event: DataGridRowDragEvent<Row>) => void;
    onBeforeRowDrop?: (event: DataGridRowDragEvent<Row>) => void;
    onRowDrop?: (event: DataGridRowDragEvent<Row>) => void;
    renderRowDragPreview?: (ctx: DataGridRowDragPreviewContext<Row>) => ReactNode;
}
```

Members (14):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `renderDetail` | `renderDetail?: (ctx: DataGridDetailContext<Row>) => ReactNode;` | optional | Detail row content below each expanded row. |
| `detailHeight` | `detailHeight?: number;` | optional | Estimated detail row height in px before measurement. Default 150. |
| `hasDetail` | `hasDetail?: (row: Row) => boolean;` | optional | Rows without a detail (no toggle). Called for rendered rows only. |
| `loadDetail` | `loadDetail?: (ctx: DataGridDetailLoadContext<Row>) => unknown;` | optional | Async detail content, started on expand; `renderDetail` receives `status`, `data`, `error`. |
| `defaultExpandedDetails` | `defaultExpandedDetails?: boolean \| readonly RowId[];` | optional | Initially expanded details: `true` for every row, or row ids (initial only). |
| `childGrid` | `childGrid?: DataGridChildGrid<unknown, Row>;` | optional | Child grid inside each expanded row (hierarchy grid). An inline object sees child rows as `unknown`; `defineChildGrid<Child, Parent>(config)` types the child rows. |
| `onBeforeDetailToggle` | `onBeforeDetailToggle?: (event: DataGridDetailToggleEvent<Row>) => void;` | optional |  |
| `onDetailToggle` | `onDetailToggle?: (event: DataGridDetailToggleEvent<Row>) => void;` | optional |  |
| `rowDrag` | `rowDrag?: boolean \| DataGridRowDrag;` | optional | Row drag and drop with a drag handle column; `true` reorders within the grid. |
| `onRowDragStart` | `onRowDragStart?: (event: DataGridRowDragEvent<Row>) => void;` | optional | Cancel with `event.preventDefault()`. |
| `onRowDrag` | `onRowDrag?: (event: DataGridRowDragEvent<Row>) => void;` | optional | Once per animation frame while dragging. |
| `onBeforeRowDrop` | `onBeforeRowDrop?: (event: DataGridRowDragEvent<Row>) => void;` | optional | Cancel with `event.preventDefault()`. |
| `onRowDrop` | `onRowDrop?: (event: DataGridRowDragEvent<Row>) => void;` | optional |  |
| `renderRowDragPreview` | `renderRowDragPreview?: (ctx: DataGridRowDragPreviewContext<Row>) => ReactNode;` | optional | Drag preview content (default: the first cell text and the row count). |

### DataGridDetailToggleEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDetailToggleEvent

```ts
interface DataGridDetailToggleEvent<Row> extends DataGridEvent {
    readonly rowId: RowId;
    readonly row: Row | null;
    readonly expanded: boolean;
}
```

`onBeforeDetailToggle` / `onDetailToggle`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row \| null;` |  |  |
| `expanded` | `readonly expanded: boolean;` |  | The state after the toggle (proposed in the before-event). |
| `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). |

### DataGridDevtoolsCommit

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDevtoolsCommit

```ts
interface DataGridDevtoolsCommit {
    readonly gridId: string;
    readonly phase: 'mount' | 'update' | 'nested-update';
    readonly actualDuration: number;
    readonly cells: readonly string[];
    readonly rows: readonly RowId[];
    readonly headers: readonly ColumnId[];
}
```

Dev-only commit report passed to `globalThis.__SALMON_UI_DEVTOOLS__.onCommit`.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `gridId` | `readonly gridId: string;` |  |  |
| `phase` | `readonly phase: 'mount' \| 'update' \| 'nested-update';` |  |  |
| `actualDuration` | `readonly actualDuration: number;` |  |  |
| `cells` | `readonly cells: readonly string[];` |  | `rowId:columnId` of every body cell rendered in the commit. |
| `rows` | `readonly rows: readonly RowId[];` |  |  |
| `headers` | `readonly headers: readonly ColumnId[];` |  |  |

### DataGridDialogContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDialogContext

```ts
interface DataGridDialogContext<Row> {
    readonly row: Row;
    readonly rowId: RowId;
    readonly isNew: boolean;
    readonly fields: readonly DataGridDialogField<Row>[];
    readonly errors: readonly string[];
    save(): void;
    cancel(): void;
}
```

Context of `editing.renderDialog`, `renderDialogHeader`, `renderDialogFooter`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `row` | `readonly row: Row;` |  |  |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `isNew` | `readonly isNew: boolean;` |  |  |
| `fields` | `readonly fields: readonly DataGridDialogField<Row>[];` |  |  |
| `errors` | `readonly errors: readonly string[];` |  | Row-level errors (`validateRow`, server errors). |
| `save` | `save(): void;` |  |  |
| `cancel` | `cancel(): void;` |  |  |

### DataGridDialogField

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDialogField

```ts
interface DataGridDialogField<Row> {
    readonly field: string;
    readonly column: DataGridColumnInfo<Row>;
    readonly label: string;
    readonly value: unknown;
    readonly errors: readonly string[];
    setValue(value: unknown): void;
    readonly editor: ReactNode;
}
```

One field of the dialog form (`editing.renderDialog`).

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row>;` |  |  |
| `label` | `readonly label: string;` |  |  |
| `value` | `readonly value: unknown;` |  |  |
| `errors` | `readonly errors: readonly string[];` |  |  |
| `setValue` | `setValue(value: unknown): void;` |  |  |
| `editor` | `readonly editor: ReactNode;` |  | The built-in (or `renderEditor`) editor with its label and messages. |

### DataGridDialogProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDialogProps

```ts
interface DataGridDialogProps {
    readonly title?: string;
    readonly width?: number | string;
    readonly className?: string;
    readonly style?: CSSProperties;
    readonly showCloseButton?: boolean;
}
```

Built-in dialog settings (`editing.dialogProps`).

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `title` | `readonly title?: string;` | optional | Header text. Default: the localized add / edit title. |
| `width` | `readonly width?: number \| string;` | optional | CSS width. Default 480px (capped by the viewport). |
| `className` | `readonly className?: string;` | optional |  |
| `style` | `readonly style?: CSSProperties;` | optional |  |
| `showCloseButton` | `readonly showCloseButton?: boolean;` | optional | Close button in the header. Default true. |

### DataGridEditApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditApi

```ts
interface DataGridEditApi<Row> extends DataGridClipboardApi {
    startEdit(rowId?: RowId, field?: string): CommandResult;
    save(): CommandResult;
    saveCell(): CommandResult;
    cancelEdit(): CommandResult;
    addRow(row?: Readonly<Record<string, unknown>>, index?: number): CommandResult;
    deleteRows(rowIds?: RowId | readonly RowId[]): CommandResult;
    updateRow(rowId: RowId, row: Readonly<Record<string, unknown>>): CommandResult;
    updateCell(rowId: RowId, field: string, value: unknown): CommandResult;
    setCellValue(rowId: RowId, field: string, value: unknown): CommandResult;
    setRowData(rowId: RowId, row: Row): CommandResult;
    applyChanges(changes: EditDataChanges<Row>): CommandResult;
    getPendingChanges(): EditBatchChanges<Row>;
    getBatchPreview(): EditPreview | undefined;
    getEditSnapshot(): EditSnapshot | undefined;
    hasUnsavedChanges(): boolean;
    whenEditSettled(): Promise<void>;
    validateBatch(): Promise<boolean>;
    undo(): CommandResult;
    redo(): CommandResult;
    fillSelection(rowId: RowId, field: string): CommandResult;
}
```

Editing methods of the `DataGrid` instance.

Members (22):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `startEdit` | `startEdit(rowId?: RowId, field?: string): CommandResult;` |  | Row and dialog mode edit the row, batch and cell mode the cell. Without a row id: the first selected row. |
| `save` | `save(): CommandResult;` |  | Saves: the active row or cell; in batch mode every pending change. |
| `saveCell` | `saveCell(): CommandResult;` |  | Commits the active editor only (batch mode keeps the change pending). |
| `cancelEdit` | `cancelEdit(): CommandResult;` |  | Discards the active editor; in batch mode without an open editor, every pending change. |
| `addRow` | `addRow(row?: Readonly<Record<string, unknown>>, index?: number): CommandResult;` |  | Index 0 adds at the top, at or past the end at the bottom. |
| `deleteRows` | `deleteRows(rowIds?: RowId \| readonly RowId[]): CommandResult;` |  | Without ids: the selected rows. Batch mode marks the rows until save. |
| `updateRow` | `updateRow(rowId: RowId, row: Readonly<Record<string, unknown>>): CommandResult;` |  |  |
| `updateCell` | `updateCell(rowId: RowId, field: string, value: unknown): CommandResult;` |  | Edits a cell as a user would (draft in batch mode). |
| `setCellValue` | `setCellValue(rowId: RowId, field: string, value: unknown): CommandResult;` |  | Silent data updates without the edit lifecycle (local sources). |
| `setRowData` | `setRowData(rowId: RowId, row: Row): CommandResult;` |  |  |
| `applyChanges` | `applyChanges(changes: EditDataChanges<Row>): CommandResult;` |  |  |
| `getPendingChanges` | `getPendingChanges(): EditBatchChanges<Row>;` |  |  |
| `getBatchPreview` | `getBatchPreview(): EditPreview \| undefined;` |  |  |
| `getEditSnapshot` | `getEditSnapshot(): EditSnapshot \| undefined;` |  |  |
| `hasUnsavedChanges` | `hasUnsavedChanges(): boolean;` |  |  |
| `whenEditSettled` | `whenEditSettled(): Promise<void>;` |  |  |
| `validateBatch` | `validateBatch(): Promise<boolean>;` |  | Validates every pending change without saving; resolves true when valid. |
| `undo` | `undo(): CommandResult;` |  | Undoes the last edit (needs `editing.undo`). |
| `redo` | `redo(): CommandResult;` |  |  |
| `fillSelection` | `fillSelection(rowId: RowId, field: string): CommandResult;` |  | Fills the selected cell range's content over the range extended to `field` of `rowId` (fill handle). |
| `copy` | `copy: (options?: DataGridCopyOptions \| undefined) => CommandResult;` | inherited | Copies the cell range, else the selected rows, else the focused cell to the system clipboard (drafts included). Falls back to a copy dialog when the browser blocks clipboard access. `rejected` with `nothingToCopy` or `cancelled` (`onBeforeCopy`). |
| `paste` | `paste: (text?: string \| undefined) => CommandResult;` | inherited | Pastes TSV `text` at the selected range or focused cell. Without `text`, reads the system clipboard (`async`), or opens a paste dialog when the Clipboard API is unavailable. |

### DataGridEditCancelEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditCancelEvent

```ts
interface DataGridEditCancelEvent extends DataGridEvent {
    readonly rowId: RowId | null;
    readonly field: string | null;
    readonly scope: 'editor' | 'batch';
}
```

`onBeforeEditCancel` / `onEditCancel`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId \| null;` |  |  |
| `field` | `readonly field: string \| null;` |  |  |
| `scope` | `readonly scope: 'editor' \| 'batch';` |  | `batch`: every pending change is discarded. |
| `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). |

### DataGridEditColumn

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditColumn

```ts
interface DataGridEditColumn<Row> {
    readonly editor?: DataGridEditorType | (string & {});
    readonly editorProps?: DataGridEditorProps;
    readonly renderEditor?: (ctx: DataGridEditorContext<Row>) => ReactNode;
    readonly commands?: readonly DataGridCommandItem<Row>[];
}
```

Editing fields of `DataGridColumn`.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `editor` | `readonly editor?: DataGridEditorType \| (string & {});` | optional | Built-in editor. Default: from `type` (`number`, `boolean` -> `checkbox`, `date`, `datetime`, lookups -> `select`, else `text`). |
| `editorProps` | `readonly editorProps?: DataGridEditorProps;` | optional | Props of the built-in editor. |
| `renderEditor` | `readonly renderEditor?: (ctx: DataGridEditorContext<Row>) => ReactNode;` | optional | Custom editor. |
| `commands` | `readonly commands?: readonly DataGridCommandItem<Row>[];` | optional | Command column buttons. A column with `commands` is never edited itself. |

### DataGridEditProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditProps

```ts
interface DataGridEditProps<Row> extends DataGridClipboardProps {
    editing?: boolean | DataGridEditing<Row>;
    onBeforeEditStart?: (event: DataGridEditStartEvent<Row>) => void;
    onEditStart?: (event: DataGridEditStartEvent<Row>) => void;
    onBeforeCellValueChange?: (event: DataGridCellValueChangeEvent) => void;
    onCellValueChange?: (event: DataGridCellValueChangeEvent) => void;
    onBeforeSave?: (event: DataGridSaveEvent<Row>) => void;
    onSave?: (event: DataGridSaveEvent<Row>) => void;
    onBeforeAdd?: (event: DataGridAddEvent<Row>) => void;
    onAdd?: (event: DataGridAddEvent<Row>) => void;
    onBeforeDelete?: (event: DataGridDeleteEvent<Row>) => void;
    onDelete?: (event: DataGridDeleteEvent<Row>) => void;
    onBeforeEditCancel?: (event: DataGridEditCancelEvent) => void;
    onEditCancel?: (event: DataGridEditCancelEvent) => void;
    onCommandClick?: (event: DataGridCommandClickEvent<Row>) => void;
}
```

Editing props of `DataGrid`.

Members (17):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `editing` | `editing?: boolean \| DataGridEditing<Row>;` | optional | Editing. `true` for the defaults (row mode). The module is registered when the initial value is set. |
| `onBeforeEditStart` | `onBeforeEditStart?: (event: DataGridEditStartEvent<Row>) => void;` | optional |  |
| `onEditStart` | `onEditStart?: (event: DataGridEditStartEvent<Row>) => void;` | optional |  |
| `onBeforeCellValueChange` | `onBeforeCellValueChange?: (event: DataGridCellValueChangeEvent) => void;` | optional |  |
| `onCellValueChange` | `onCellValueChange?: (event: DataGridCellValueChangeEvent) => void;` | optional |  |
| `onBeforeSave` | `onBeforeSave?: (event: DataGridSaveEvent<Row>) => void;` | optional |  |
| `onSave` | `onSave?: (event: DataGridSaveEvent<Row>) => void;` | optional |  |
| `onBeforeAdd` | `onBeforeAdd?: (event: DataGridAddEvent<Row>) => void;` | optional |  |
| `onAdd` | `onAdd?: (event: DataGridAddEvent<Row>) => void;` | optional |  |
| `onBeforeDelete` | `onBeforeDelete?: (event: DataGridDeleteEvent<Row>) => void;` | optional |  |
| `onDelete` | `onDelete?: (event: DataGridDeleteEvent<Row>) => void;` | optional |  |
| `onBeforeEditCancel` | `onBeforeEditCancel?: (event: DataGridEditCancelEvent) => void;` | optional |  |
| `onEditCancel` | `onEditCancel?: (event: DataGridEditCancelEvent) => void;` | optional |  |
| `onCommandClick` | `onCommandClick?: (event: DataGridCommandClickEvent<Row>) => void;` | optional |  |
| `onBeforeCopy` | `onBeforeCopy?: ((event: DataGridBeforeCopyEvent) => void);` | optional, inherited |  |
| `onBeforePaste` | `onBeforePaste?: ((event: DataGridBeforePasteEvent) => void);` | optional, inherited |  |
| `onBeforeFill` | `onBeforeFill?: ((event: DataGridBeforeFillEvent) => void);` | optional, inherited |  |

### DataGridEditStartEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditStartEvent

```ts
interface DataGridEditStartEvent<Row> extends DataGridEvent {
    readonly rowId: RowId;
    readonly row: Row | undefined;
    readonly field: string | null;
    readonly mode: EditMode;
    readonly isNew: boolean;
}
```

`onBeforeEditStart` / `onEditStart`.

Members (9):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row \| undefined;` |  | The row (the draft base for added rows). |
| `field` | `readonly field: string \| null;` |  | The cell in batch and cell mode (and the focused editor in row mode); null otherwise. |
| `mode` | `readonly mode: EditMode;` |  |  |
| `isNew` | `readonly isNew: boolean;` |  |  |
| `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). |

### DataGridEditing

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditing

```ts
interface DataGridEditing<Row = unknown> {
    readonly edit?: boolean;
    readonly add?: boolean;
    readonly delete?: boolean;
    readonly mode?: EditMode;
    readonly newRowPosition?: 'top' | 'bottom' | 'above' | 'below' | 'child';
    readonly showNewRow?: boolean;
    readonly editOnDoubleClick?: boolean;
    readonly confirmSave?: boolean;
    readonly confirmDiscard?: boolean;
    readonly confirmDelete?: boolean;
    readonly tabToNextRow?: boolean;
    readonly undo?: boolean;
    readonly undoLimit?: number;
    readonly fillHandle?: boolean;
    readonly guardUnsaved?: boolean | readonly DataGridGuardedAction[];
    readonly isCellEditable?: (ctx: EditCellContext<Row>) => boolean;
    readonly validateRow?: RowValidator<Row>;
    readonly newRow?: () => Partial<Row>;
    readonly dialogProps?: DataGridDialogProps;
    readonly renderDialog?: (ctx: DataGridDialogContext<Row>) => ReactNode;
    readonly renderDialogHeader?: (ctx: DataGridDialogContext<Row>) => ReactNode;
    readonly renderDialogFooter?: (ctx: DataGridDialogContext<Row>) => ReactNode;
}
```

`editing` prop.

Members (22):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `edit` | `readonly edit?: boolean;` | optional | Existing rows can be edited. Default true. |
| `add` | `readonly add?: boolean;` | optional | Rows can be added. Default true. |
| `delete` | `readonly delete?: boolean;` | optional | Rows can be deleted. Default true. |
| `mode` | `readonly mode?: EditMode;` | optional | `row` (inline row form), `dialog`, `batch`, or `cell` (Salmon: one-cell commits). Default `row`. Initial only. |
| `newRowPosition` | `readonly newRowPosition?: 'top' \| 'bottom' \| 'above' \| 'below' \| 'child';` | optional | Where added rows appear. Default `top`. Tree mode adds `above`, `below` and `child`, relative to the focused row. |
| `showNewRow` | `readonly showNewRow?: boolean;` | optional | An always-visible blank add row at `newRowPosition`. Enter (or Save) writes it and a fresh blank row follows; Escape clears it; its editors are disabled while another row edits. Row mode only. Default false. |
| `editOnDoubleClick` | `readonly editOnDoubleClick?: boolean;` | optional | Double click starts editing. Default true. |
| `confirmSave` | `readonly confirmSave?: boolean;` | optional | Ask before saving a batch from the toolbar or a menu. `api.save()` never asks. Default true. |
| `confirmDiscard` | `readonly confirmDiscard?: boolean;` | optional | Ask before discarding unsaved batch changes (batch cancel, guarded actions). Default true. |
| `confirmDelete` | `readonly confirmDelete?: boolean;` | optional | Ask before deleting rows from the keyboard, toolbar, menus, or command buttons. Default false. |
| `tabToNextRow` | `readonly tabToNextRow?: boolean;` | optional | Tab from the last editable cell continues in the next row. Default: true in batch and cell mode. |
| `undo` | `readonly undo?: boolean;` | optional | Undo and redo of edits (Mod+Z, Mod+Y). Default false. |
| `undoLimit` | `readonly undoLimit?: number;` | optional | Undo history depth. Default 10. |
| `fillHandle` | `readonly fillHandle?: boolean;` | optional | Spreadsheet fill handle: a square at the bottom-right of the selected cell range; dragging it down, up, left or right tiles the range over the extended range (`onBeforeFill`). Default false. Needs `selection.mode` `cell` or `both`. |
| `guardUnsaved` | `readonly guardUnsaved?: boolean \| readonly DataGridGuardedAction[];` | optional | Intercept query actions while there are unsaved changes: `true` guards sorting, filtering, searching, paging, and grouping; a list guards those actions only. The action runs after the changes are discarded (with a `confirmDiscard` prompt). Also warns on page unload. Default: true in batch mode. |
| `isCellEditable` | `readonly isCellEditable?: (ctx: EditCellContext<Row>) => boolean;` | optional | Extra per-cell edit policy. |
| `validateRow` | `readonly validateRow?: RowValidator<Row>;` | optional | Row-level validation before a row (or batch) saves; may be async. |
| `newRow` | `readonly newRow?: () => Partial<Row>;` | optional | Values of an added row, merged over the columns' `defaultValue`. |
| `dialogProps` | `readonly dialogProps?: DataGridDialogProps;` | optional | Built-in dialog settings. |
| `renderDialog` | `readonly renderDialog?: (ctx: DataGridDialogContext<Row>) => ReactNode;` | optional | Replaces the dialog form body. |
| `renderDialogHeader` | `readonly renderDialogHeader?: (ctx: DataGridDialogContext<Row>) => ReactNode;` | optional |  |
| `renderDialogFooter` | `readonly renderDialogFooter?: (ctx: DataGridDialogContext<Row>) => ReactNode;` | optional |  |

### DataGridEditorContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditorContext

```ts
interface DataGridEditorContext<Row> {
    readonly value: unknown;
    setValue(value: unknown): void;
    save(): void;
    cancel(): void;
    readonly row: Row;
    readonly rowId: RowId;
    readonly field: string;
    readonly column: DataGridColumnInfo<Row>;
    readonly errors: readonly string[];
    readonly isNew: boolean;
    readonly placement: 'cell' | 'dialog';
    readonly editorProps: DataGridEditorProps;
    readonly inputProps: DataGridEditorInputProps;
}
```

Context of column `renderEditor`.

Members (13):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `value` | `readonly value: unknown;` |  | The current draft value. |
| `setValue` | `setValue(value: unknown): void;` |  | Sets the draft (the column parser converts strings; dates as ISO strings or `Date`). |
| `save` | `save(): void;` |  | Commits like Enter (row: the row; batch and cell: the cell). |
| `cancel` | `cancel(): void;` |  |  |
| `row` | `readonly row: Row;` |  | The row with its drafts applied. |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `field` | `readonly field: string;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row>;` |  |  |
| `errors` | `readonly errors: readonly string[];` |  |  |
| `isNew` | `readonly isNew: boolean;` |  |  |
| `placement` | `readonly placement: 'cell' \| 'dialog';` |  | Where the editor renders. |
| `editorProps` | `readonly editorProps: DataGridEditorProps;` |  |  |
| `inputProps` | `readonly inputProps: DataGridEditorInputProps;` |  | Spread onto the focusable element: id, aria-invalid / aria-describedby / aria-required, autofocus. The editing keys are handled by the editor wrapper. |

### DataGridEditorInputProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditorInputProps

```ts
interface DataGridEditorInputProps {
    id: string;
    'aria-label': string;
    'aria-invalid': boolean | undefined;
    'aria-describedby': string | undefined;
    'aria-required': boolean | undefined;
    autoFocus: boolean;
    disabled?: boolean | undefined;
}
```

Attributes the editor element must carry (ids, ARIA wiring, keyboard). Spread onto the focusable input.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `id: string;` |  |  |
| `aria-label` | `'aria-label': string;` |  |  |
| `aria-invalid` | `'aria-invalid': boolean \| undefined;` |  |  |
| `aria-describedby` | `'aria-describedby': string \| undefined;` |  |  |
| `aria-required` | `'aria-required': boolean \| undefined;` |  |  |
| `autoFocus` | `autoFocus: boolean;` |  | The editor that takes DOM focus when it mounts. |
| `disabled` | `disabled?: boolean \| undefined;` | optional | The always-visible add row while another row edits. |

### DataGridEditorOption

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditorOption

```ts
interface DataGridEditorOption {
    readonly value: unknown;
    readonly label: string;
}
```

One option of the `select` editor (`editorProps.options`).

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `value` | `readonly value: unknown;` |  |  |
| `label` | `readonly label: string;` |  |  |

### DataGridEditorProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditorProps

```ts
interface DataGridEditorProps {
    readonly options?: readonly (string | number | boolean | DataGridEditorOption)[];
    readonly placeholder?: string;
    readonly min?: string | number;
    readonly max?: string | number;
    readonly step?: string | number;
    readonly minLength?: number;
    readonly maxLength?: number;
    readonly autoComplete?: string;
    readonly spellCheck?: boolean;
    readonly multiline?: boolean;
    readonly firstDayOfWeek?: number;
    readonly calendar?: string;
    readonly className?: string;
    readonly style?: CSSProperties;
    readonly [key: string]: unknown;
}
```

Props of the built-in editors (column `editorProps`). Unknown keys are ignored.

Members (14):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `options` | `readonly options?: readonly (string \| number \| boolean \| DataGridEditorOption)[];` | optional | `select`: options; values are primitives or `{ value, label }`. Lookup columns default to their local lookup rows. |
| `placeholder` | `readonly placeholder?: string;` | optional | `select`: label of an empty first option (clears the value). |
| `min` | `readonly min?: string \| number;` | optional | `number`: the smallest and largest value: ArrowUp / ArrowDown stop there, and a typed plain number outside the range is clamped when the editor commits (Enter, Tab) or loses focus; also `aria-valuemin` / `aria-valuemax`. `date` / `datetime`: the earliest and latest day the date picker offers (days outside are disabled; typed text is not clamped). The `text` editor has no value range: use `minLength` / `maxLength`. |
| `max` | `readonly max?: string \| number;` | optional |  |
| `step` | `readonly step?: string \| number;` | optional | `number`: the ArrowUp / ArrowDown increment (default 1). |
| `minLength` | `readonly minLength?: number;` | optional | `text`: native `minlength` / `maxlength` of the input or textarea. |
| `maxLength` | `readonly maxLength?: number;` | optional |  |
| `autoComplete` | `readonly autoComplete?: string;` | optional |  |
| `spellCheck` | `readonly spellCheck?: boolean;` | optional |  |
| `multiline` | `readonly multiline?: boolean;` | optional | `text`: `<textarea>` instead of `<input>`. |
| `firstDayOfWeek` | `readonly firstDayOfWeek?: number;` | optional | `date` / `datetime`: first day of the calendar week, `0` Sunday ... `6` Saturday. Default: from `locale`. |
| `calendar` | `readonly calendar?: string;` | optional | `date` / `datetime`: `Intl` calendar of the picker labels (`'japanese'`, `'buddhist'`, `'islamic-umalqura'`, ...). Default: the `locale` calendar. |
| `className` | `readonly className?: string;` | optional |  |
| `style` | `readonly style?: CSSProperties;` | optional |  |

### DataGridEmptyContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEmptyContext

```ts
interface DataGridEmptyContext {
    reason: 'noData' | 'noMatch';
}
```

Members (1):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `reason` | `reason: 'noData' \| 'noMatch';` |  |  |

### DataGridErrorEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridErrorEvent

```ts
interface DataGridErrorEvent extends DataGridEvent {
    readonly error: Error;
    readonly action: 'sort' | 'filter' | 'search' | 'page' | 'data' | 'save' | 'persistState' | (string & {});
}
```

`onError` (`type: 'error'`): a rejected action. Not cancellable.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `error` | `readonly error: Error;` |  |  |
| `action` | `readonly action: 'sort' \| 'filter' \| 'search' \| 'page' \| 'data' \| 'save' \| 'persistState' \| (string & {});` |  | `data`: the data source failed to load (the body shows `renderError`). `save`: a write (save or delete) failed or was rejected in part; the failed rows keep their drafts (`onSave` carries the result). |
| `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). |

### DataGridEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEvent

```ts
interface DataGridEvent {
    readonly type: string;
    readonly source: DataGridEventSource;
    readonly defaultPrevented: boolean;
    preventDefault(): void;
}
```

Base of every `DataGrid` event object.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `readonly type: string;` |  | `'sortChange'`, `'beforeSortChange'`, ... |
| `source` | `readonly source: DataGridEventSource;` |  |  |
| `defaultPrevented` | `readonly defaultPrevented: boolean;` |  | True after `preventDefault()` (before-events and click events). |
| `preventDefault` | `preventDefault(): void;` |  | Before-events and click events: cancels the action (or the built-in behavior). |

### DataGridExcelExportOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridExcelExportOptions

```ts
interface DataGridExcelExportOptions<Row> extends DataGridExportOptions<Row> {
    readonly grids?: readonly {
        readonly exportToExcel: unknown;
    }[];
    readonly [option: string]: unknown;
}
```

Excel options: the shared options plus the `XlsxOptions` of
`@salmonui/export/xlsx` (`sheetName`, `styles`, `header`, `footer`,
`freezeHeader`, `mergeRepeatedValues`, `layout`, `gap`, ...), passed through.

Members (14):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rows` | `rows?: readonly Row[];` | optional, inherited | Rows to export instead of the grid rows (for example the selected rows), with the grid's columns. |
| `columns` | `columns?: readonly ExportColumnOption[];` | optional, inherited | Export-only columns, in order. |
| `fileName` | `fileName?: string;` | optional, inherited | Download name; the format extension is added when missing. Default `export`. |
| `grids` | `readonly grids?: readonly {     readonly exportToExcel: unknown; }[];` | optional | Further grids written into the same workbook (`layout: 'sheets' \| 'stacked'`). |
| `pages` | `pages?: "all" \| "current";` | optional, inherited | `all` (default): every page of the current query. `current`: the current page as shown. |
| `includeHiddenColumns` | `includeHiddenColumns?: boolean;` | optional, inherited | Include hidden columns. Default false. |
| `hierarchy` | `hierarchy?: "all" \| "expanded" \| "none";` | optional, inherited | Detail and child-grid rows: `expanded` (default), `all`, or `none`. |
| `tree` | `tree?: "all" \| "expanded";` | optional, inherited | Tree mode rows: `expanded` (default) exports the visible rows in pre-order; `all` exports every kept row regardless of expansion (XLSX `outlineCollapsed` then keeps the collapsed state). |
| `cell` | `cell?: ((ctx: ExportCellHookContext<Row>) => void \| ExportCellPatch \| null \| undefined);` | optional, inherited | Per data cell. Not called when unset. |
| `headerCell` | `headerCell?: ((ctx: ExportHeaderCellHookContext<Row>) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per header cell. |
| `aggregateCell` | `aggregateCell?: ((ctx: ExportAggregateCellHookContext) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per aggregate cell (grid footer, group footer, group caption). |
| `groupCaption` | `groupCaption?: ((ctx: ExportGroupCaptionHookContext) => void \| string \| null \| undefined);` | optional, inherited | Group caption text. |
| `detail` | `detail?: ((ctx: ExportDetailContext<Row>) => void \| ExportDetail \| null \| undefined);` | optional, inherited | A detail block written after a data row (text lines or a child table), or null for none. |
| `download` | `download?: boolean;` | optional, inherited | Downloads the file (default true); `false` only resolves it. |

### DataGridExportEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridExportEvent

```ts
interface DataGridExportEvent<Row> extends DataGridEvent {
    readonly format: ExportFormat;
    readonly options: DataGridExportOptions<Row>;
    readonly file: ExportFile<Uint8Array | string>;
}
```

An Excel or PDF export finished: the file is ready (before the download).

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `format` | `readonly format: ExportFormat;` |  |  |
| `options` | `readonly options: DataGridExportOptions<Row>;` |  |  |
| `file` | `readonly file: ExportFile<Uint8Array \| string>;` |  |  |
| `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). |

### DataGridExportOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridExportOptions

```ts
interface DataGridExportOptions<Row> extends ExportOptions<Row>, DataGridExportHooks<Row> {
    readonly download?: boolean;
}
```

Options of every export method.

Members (13):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `download` | `readonly download?: boolean;` | optional | Downloads the file (default true); `false` only resolves it. |
| `pages` | `pages?: "all" \| "current";` | optional, inherited | `all` (default): every page of the current query. `current`: the current page as shown. |
| `includeHiddenColumns` | `includeHiddenColumns?: boolean;` | optional, inherited | Include hidden columns. Default false. |
| `rows` | `rows?: readonly Row[];` | optional, inherited | Rows to export instead of the grid rows (for example the selected rows), with the grid's columns. |
| `columns` | `columns?: readonly ExportColumnOption[];` | optional, inherited | Export-only columns, in order. |
| `fileName` | `fileName?: string;` | optional, inherited | Download name; the format extension is added when missing. Default `export`. |
| `hierarchy` | `hierarchy?: "all" \| "expanded" \| "none";` | optional, inherited | Detail and child-grid rows: `expanded` (default), `all`, or `none`. |
| `tree` | `tree?: "all" \| "expanded";` | optional, inherited | Tree mode rows: `expanded` (default) exports the visible rows in pre-order; `all` exports every kept row regardless of expansion (XLSX `outlineCollapsed` then keeps the collapsed state). |
| `cell` | `cell?: ((ctx: ExportCellHookContext<Row>) => void \| ExportCellPatch \| null \| undefined);` | optional, inherited | Per data cell. Not called when unset. |
| `headerCell` | `headerCell?: ((ctx: ExportHeaderCellHookContext<Row>) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per header cell. |
| `aggregateCell` | `aggregateCell?: ((ctx: ExportAggregateCellHookContext) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per aggregate cell (grid footer, group footer, group caption). |
| `groupCaption` | `groupCaption?: ((ctx: ExportGroupCaptionHookContext) => void \| string \| null \| undefined);` | optional, inherited | Group caption text. |
| `detail` | `detail?: ((ctx: ExportDetailContext<Row>) => void \| ExportDetail \| null \| undefined);` | optional, inherited | A detail block written after a data row (text lines or a child table), or null for none. |

### DataGridExportWriters

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridExportWriters

```ts
interface DataGridExportWriters {
    readonly excel?: () => Promise<{
        readonly exportXlsx: WriterFn;
    }>;
    readonly pdf?: () => Promise<{
        readonly exportPdf: WriterFn;
    }>;
}
```

On-demand Excel and PDF writer modules. Pass dynamic imports so the writers
stay out of the initial bundle: `excel` loads the `xlsx` subpath and
`pdf` the `pdf` subpath of the

- `@salmonui` /export package (docs: Export).

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `excel` | `readonly excel?: () => Promise<{     readonly exportXlsx: WriterFn; }>;` | optional |  |
| `pdf` | `readonly pdf?: () => Promise<{     readonly exportPdf: WriterFn; }>;` | optional |  |

### DataGridFilterBuilderApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterBuilderApi

```ts
interface DataGridFilterBuilderApi {
    openFilterBuilder(): void;
    closeFilterBuilder(): void;
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `openFilterBuilder` | `openFilterBuilder(): void;` |  | Opens the filter builder dialog. Ignored unless `filtering.builder` is set. |
| `closeFilterBuilder` | `closeFilterBuilder(): void;` |  | Closes the filter builder dialog without applying. |

### DataGridFilterBuilderOpenEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterBuilderOpenEvent

```ts
interface DataGridFilterBuilderOpenEvent extends DataGridEvent {
    readonly filters: readonly DataGridFilter[];
}
```

`onBeforeFilterBuilderOpen` (`type: 'beforeFilterBuilderOpen'`,
cancellable: the dialog stays closed).

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `type` | `type: string;` | inherited | `'sortChange'`, `'beforeSortChange'`, ... |
| `source` | `source: DataGridEventSource;` | inherited |  |
| `filters` | `readonly filters: readonly DataGridFilter[];` |  | The applied filters the dialog opens with. |
| `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). |

### DataGridFilterBuilderProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterBuilderProps

```ts
interface DataGridFilterBuilderProps {
    onBeforeFilterBuilderOpen?: (event: DataGridFilterBuilderOpenEvent) => void;
}
```

Members (1):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `onBeforeFilterBuilderOpen` | `onBeforeFilterBuilderOpen?: (event: DataGridFilterBuilderOpenEvent) => void;` | optional |  |

### DataGridFilterChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterChangeEvent

```ts
interface DataGridFilterChangeEvent extends DataGridEvent {
    readonly filters: readonly DataGridFilter[];
    readonly previousFilters: readonly DataGridFilter[];
    readonly field: string | null;
    readonly ui?: 'builder';
}
```

`onBeforeFilterChange` (`type: 'beforeFilterChange'`) and `onFilterChange` (`'filterChange'`).

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `filters` | `readonly filters: readonly DataGridFilter[];` |  | Proposed (before) or applied (after) filters. |
| `previousFilters` | `readonly previousFilters: readonly DataGridFilter[];` |  |  |
| `field` | `readonly field: string \| null;` |  |  |
| `ui` | `readonly ui?: 'builder';` | optional | `'builder'` when the filter builder dialog applied the change; absent otherwise. |
| `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). |

### DataGridFilterCondition

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterCondition

```ts
interface DataGridFilterCondition {
    field: string;
    operator: DataGridFilterOperator;
    value?: Json;
    logic?: 'and' | 'or';
    matchCase?: boolean;
    ignoreAccents?: boolean;
}
```

One filter condition.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `field: string;` |  |  |
| `operator` | `operator: DataGridFilterOperator;` |  |  |
| `value` | `value?: Json;` | optional | `between`: `[from, to]`; `in` / `notIn`: an array. |
| `logic` | `logic?: 'and' \| 'or';` | optional | How the condition joins the previous condition on the same column at the top level. Default `and`. Ignored inside a group (the group's `logic` combines its members). |
| `matchCase` | `matchCase?: boolean;` | optional |  |
| `ignoreAccents` | `ignoreAccents?: boolean;` | optional |  |

### DataGridFilterContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterContext

```ts
interface DataGridFilterContext<Row> {
    readonly column: DataGridColumnInfo<Row>;
    readonly field: string;
    readonly operators: readonly DataGridFilterOperator[];
    readonly operator: DataGridFilterOperator;
    readonly editorProps: Readonly<Record<string, unknown>>;
    readonly value: Json;
    setOperator(operator: DataGridFilterOperator): void;
    setValue(value: Json): void;
    apply(value?: Json): void;
    clear(): void;
}
```

Context of column `renderFilter` (menu value editor) and `renderFilterCell` (filter row cell).

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `column` | `readonly column: DataGridColumnInfo<Row>;` |  |  |
| `field` | `readonly field: string;` |  |  |
| `operators` | `readonly operators: readonly DataGridFilterOperator[];` |  | Operators offered for the column. |
| `operator` | `readonly operator: DataGridFilterOperator;` |  |  |
| `editorProps` | `readonly editorProps: Readonly<Record<string, unknown>>;` |  | Column `filter.editorProps` (empty when not set). |
| `value` | `readonly value: Json;` |  | The draft value (menu) or the applied value (filter row). |
| `setOperator` | `setOperator(operator: DataGridFilterOperator): void;` |  |  |
| `setValue` | `setValue(value: Json): void;` |  |  |
| `apply` | `apply(value?: Json): void;` |  | Applies the draft; `value` overrides it. The menu closes after applying. |
| `clear` | `clear(): void;` |  |  |

### DataGridFilterGroup

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterGroup

```ts
interface DataGridFilterGroup {
    logic: 'and' | 'or';
    not?: boolean;
    filters: readonly DataGridFilter[];
}
```

Nested AND/OR group: `logic` combines its members (`{ logic: 'or',
filters: [A, B] }` is A OR B); member `logic` is ignored. A top-level
group is ANDed with the other top-level filters.

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `logic` | `logic: 'and' \| 'or';` |  |  |
| `not` | `not?: boolean;` | optional | Negates the group: NOT (A AND B). Default false. |
| `filters` | `filters: readonly DataGridFilter[];` |  |  |

### DataGridFilterMenuOpenEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterMenuOpenEvent

```ts
interface DataGridFilterMenuOpenEvent extends DataGridEvent {
    readonly field: string;
    readonly ui: Exclude<DataGridFilterUi, 'row'>;
    readonly dialog: 'menu' | 'custom';
}
```

`onBeforeFilterMenuOpen` (`type: 'beforeFilterMenuOpen'`, cancellable: the
menu or dialog stays closed) and `onFilterMenuOpen` (`'filterMenuOpen'`,
after it rendered). Opening the custom-condition section of the Excel menu
raises both with `dialog: 'custom'`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  |  |
| `ui` | `readonly ui: Exclude<DataGridFilterUi, 'row'>;` |  | The menu's filter UI (a filter row column opened from the column menu shows `'menu'`). |
| `dialog` | `readonly dialog: 'menu' \| 'custom';` |  |  |
| `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). |

### DataGridFiltering

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFiltering

```ts
interface DataGridFiltering {
    ui?: DataGridFilterUi;
    filters?: readonly DataGridFilter[];
    matchCase?: boolean;
    ignoreAccents?: boolean;
    trigger?: 'input' | 'enter';
    debounce?: number;
    showOperators?: boolean;
    operators?: Partial<Record<'string' | 'number' | 'date' | 'datetime' | 'boolean', readonly DataGridFilterOperator[]>>;
    headerButton?: boolean;
    checklistPageSize?: number;
    checklistInfiniteScroll?: boolean;
    showStatus?: boolean;
    loadingIndicator?: 'spinner' | 'skeleton';
    builder?: boolean | {
        readonly includeHidden?: boolean;
    };
}
```

`filtering` prop.

Members (14):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `ui` | `ui?: DataGridFilterUi;` | optional | Default `row`. |
| `filters` | `filters?: readonly DataGridFilter[];` | optional | Active filters. |
| `matchCase` | `matchCase?: boolean;` | optional | Default for conditions that omit it. Default false. |
| `ignoreAccents` | `ignoreAccents?: boolean;` | optional | Default for conditions that omit it. Default false. |
| `trigger` | `trigger?: 'input' \| 'enter';` | optional | Filter row: apply on Enter (default) or while typing after `debounce`. |
| `debounce` | `debounce?: number;` | optional | Delay of `trigger: 'input'` in ms. Default 1500. |
| `showOperators` | `showOperators?: boolean;` | optional | Filter row: an operator dropdown per cell. Default false. |
| `operators` | `operators?: Partial<Record<'string' \| 'number' \| 'date' \| 'datetime' \| 'boolean', readonly DataGridFilterOperator[]>>;` | optional | Operators offered per column type, in order (the first is the default). Labels come from the `localeText` keys `operator<Name>` (`operatorContains`). |
| `headerButton` | `headerButton?: boolean;` | optional | Header filter button for `menu` / `checklist` / `excel` (Salmon). Default true. |
| `checklistPageSize` | `checklistPageSize?: number;` | optional | Distinct values the `checklist` / `excel` list requests at a time. Default 100. |
| `checklistInfiniteScroll` | `checklistInfiniteScroll?: boolean;` | optional | Load the next `checklistPageSize` values as the list scrolls to its end. Default true; false requests every value at once. |
| `showStatus` | `showStatus?: boolean;` | optional | Filter row: the default pager shows the applied filters ("Filtered by ..."). Default true. No pager, no status. |
| `loadingIndicator` | `loadingIndicator?: 'spinner' \| 'skeleton';` | optional | Loading state of the `checklist` / `excel` values while a remote facet loads. Default `skeleton` (shimmer placeholder rows). |
| `builder` | `builder?: boolean \| {     readonly includeHidden?: boolean; };` | optional | Advanced filter builder dialog: edits the nested AND/OR groups of `filters`. Open it with the `filterBuilder` toolbar item or `api.openFilterBuilder()`. `includeHidden` also offers hidden columns. Default false. |

### DataGridFocusedCell

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFocusedCell

```ts
interface DataGridFocusedCell {
    readonly rowId: RowId | null;
    readonly field: string;
    readonly region: 'body' | 'header';
}
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId \| null;` |  |  |
| `field` | `readonly field: string;` |  |  |
| `region` | `readonly region: 'body' \| 'header';` |  |  |

### DataGridGroupCaptionContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridGroupCaptionContext

```ts
interface DataGridGroupCaptionContext<Row> {
    readonly group: GroupRowSnapshot;
    readonly field: string;
    readonly header: string;
    readonly key: GroupRowSnapshot['key'];
    readonly value: unknown;
    readonly formattedKey: string;
    readonly count: number;
    readonly expanded: boolean;
    readonly aggregates: AggregateValues;
    readonly rows: () => readonly Row[];
    readonly toggle: () => void;
}
```

Context of `grouping.renderCaption`.

Members (11):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `group` | `readonly group: GroupRowSnapshot;` |  |  |
| `field` | `readonly field: string;` |  |  |
| `header` | `readonly header: string;` |  |  |
| `key` | `readonly key: GroupRowSnapshot['key'];` |  | JSON key and raw value of the group. |
| `value` | `readonly value: unknown;` |  |  |
| `formattedKey` | `readonly formattedKey: string;` |  |  |
| `count` | `readonly count: number;` |  |  |
| `expanded` | `readonly expanded: boolean;` |  |  |
| `aggregates` | `readonly aggregates: AggregateValues;` |  |  |
| `rows` | `readonly rows: () => readonly Row[];` |  | Data rows of the group (computed on call). |
| `toggle` | `readonly toggle: () => void;` |  |  |

### DataGridGroupChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridGroupChangeEvent

```ts
interface DataGridGroupChangeEvent extends DataGridEvent {
    readonly groupBy: readonly string[];
    readonly previousGroupBy: readonly string[];
    readonly action: 'group' | 'ungroup' | 'move' | 'clear';
    readonly field: string | null;
}
```

`onBeforeGroupChange` / `onGroupChange`.

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `groupBy` | `readonly groupBy: readonly string[];` |  | Grouped fields proposed (before) or applied (after). |
| `previousGroupBy` | `readonly previousGroupBy: readonly string[];` |  |  |
| `action` | `readonly action: 'group' \| 'ungroup' \| 'move' \| 'clear';` |  |  |
| `field` | `readonly field: string \| null;` |  | The column grouped, ungrouped, or moved; null for clear and set. |
| `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). |

### DataGridGroupToggleEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridGroupToggleEvent

```ts
interface DataGridGroupToggleEvent<Row> extends DataGridEvent {
    readonly groupId: RowId;
    readonly path: readonly GroupPathSegment[];
    readonly key: GroupRowSnapshot['key'];
    readonly expanded: boolean;
    readonly lazy: boolean;
    rows(): readonly Row[];
}
```

`onBeforeGroupToggle` / `onGroupToggle` (lazy and eager groups).

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `groupId` | `readonly groupId: RowId;` |  |  |
| `path` | `readonly path: readonly GroupPathSegment[];` |  |  |
| `key` | `readonly key: GroupRowSnapshot['key'];` |  |  |
| `expanded` | `readonly expanded: boolean;` |  | The state after the toggle (proposed in the before-event). |
| `lazy` | `readonly lazy: boolean;` |  | True in lazy mode. |
| `rows` | `rows(): readonly Row[];` |  |  |
| `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). |

### DataGridGrouping

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridGrouping

```ts
interface DataGridGrouping<Row> {
    readonly groupBy?: readonly string[];
    readonly showDropArea?: boolean;
    readonly showGroupedColumns?: boolean;
    readonly showHeaderToggle?: boolean;
    readonly showRemoveButton?: boolean;
    readonly reorderable?: boolean;
    readonly defaultExpanded?: boolean;
    readonly lazy?: boolean;
    readonly lazyChunkSize?: number;
    readonly renderCaption?: (ctx: DataGridGroupCaptionContext<Row>) => ReactNode;
}
```

`grouping` prop.

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `groupBy` | `readonly groupBy?: readonly string[];` | optional | Grouped fields in order. Reactive. Group order follows `sorting.sortBy` for the field, else ascending. |
| `showDropArea` | `readonly showDropArea?: boolean;` | optional | Group drop area above the header. Default true. |
| `showGroupedColumns` | `readonly showGroupedColumns?: boolean;` | optional | Keep grouped columns visible. Default false. |
| `showHeaderToggle` | `readonly showHeaderToggle?: boolean;` | optional | Group toggle button (`aria-pressed`) in the header of every groupable column: groups or ungroups by it. Default false. The sort-direction toggle on group chips has no option: it follows `sorting` (shown when the grid sorts and the column is sortable). |
| `showRemoveButton` | `readonly showRemoveButton?: boolean;` | optional | Remove button on group chips. Default true. |
| `reorderable` | `readonly reorderable?: boolean;` | optional | Reorder group chips by drag and Alt+Arrow keys. Default false. |
| `defaultExpanded` | `readonly defaultExpanded?: boolean;` | optional | Groups start expanded. Default true (false in lazy mode). |
| `lazy` | `readonly lazy?: boolean;` | optional | Lazy group loading with a remote source that has `capabilities.lazyGroups`. |
| `lazyChunkSize` | `readonly lazyChunkSize?: number;` | optional | Lazy mode: child rows per load. Default 100. |
| `renderCaption` | `readonly renderCaption?: (ctx: DataGridGroupCaptionContext<Row>) => ReactNode;` | optional | Replaces the caption text; the toggle stays. |

### DataGridHeaderContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridHeaderContext

```ts
interface DataGridHeaderContext<Row> {
    column: DataGridColumnInfo<Row>;
    sortDirection: 'asc' | 'desc' | null;
    sortIndex: number;
    filtered: boolean;
    grouped: boolean;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `column` | `column: DataGridColumnInfo<Row>;` |  |  |
| `sortDirection` | `sortDirection: 'asc' \| 'desc' \| null;` |  | Null when the column is not sorted. |
| `sortIndex` | `sortIndex: number;` |  | Position in a multi-column sort (0-based); -1 when not sorted. |
| `filtered` | `filtered: boolean;` |  |  |
| `grouped` | `grouped: boolean;` |  |  |

### DataGridInfiniteScroll

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridInfiniteScroll

```ts
interface DataGridInfiniteScroll<Row = unknown> {
    cache?: boolean;
    initialBlocks?: number;
    maxBlocks?: number;
    blockSize?: number;
    threshold?: number;
    debounce?: number;
    initialResult?: {
        readonly rows: readonly Row[];
        readonly totalRowCount?: number;
        readonly hasNextPage?: boolean;
    };
}
```

`infiniteScroll` settings.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `cache` | `cache?: boolean;` | optional | Keep at most `maxBlocks` blocks of rows in memory. Default false: every loaded block is kept. |
| `initialBlocks` | `initialBlocks?: number;` | optional | Blocks of the first request. Default 3. |
| `maxBlocks` | `maxBlocks?: number;` | optional | Blocks kept with `cache`; never fewer than the viewport needs. Default 3. |
| `blockSize` | `blockSize?: number;` | optional | Rows per block and per request unit. Default 100. |
| `threshold` | `threshold?: number;` | optional | Rows before the loaded end, and around the viewport, at which a block is requested. Default half a block. |
| `debounce` | `debounce?: number;` | optional | Quiet time (ms) before requesting a jump target (scrollbar drag) and between sequential requests. Default 50. |
| `initialResult` | `initialResult?: {     readonly rows: readonly Row[];     readonly totalRowCount?: number;     readonly hasNextPage?: boolean; };` | optional | The first blocks, fetched by the app (for example in a server component): rendered on the server and on the first client render, and not requested again. Rows start at row 0. |

### DataGridKeyDownContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridKeyDownContext

```ts
interface DataGridKeyDownContext {
    readonly nativeEvent: KeyboardEvent;
    readonly command: string | null;
    readonly context: DataGridKeyContext;
    readonly rowId: RowId | null;
    readonly field: string | null;
    preventDefault(): void;
}
```

Context of `onKeyDown`.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `nativeEvent` | `readonly nativeEvent: KeyboardEvent;` |  |  |
| `command` | `readonly command: string \| null;` |  | Keyboard command bound to the key in this context (`focus.down`, `edit.begin`), or null. |
| `context` | `readonly context: DataGridKeyContext;` |  |  |
| `rowId` | `readonly rowId: RowId \| null;` |  | Focused cell or header. |
| `field` | `readonly field: string \| null;` |  |  |
| `preventDefault` | `preventDefault(): void;` |  | Suppresses the built-in behavior of the binding. |

### DataGridLoadingContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridLoadingContext

```ts
interface DataGridLoadingContext {
    readonly phase: DataGridLoadingPhase;
}
```

Context of `renderLoading`.

Members (1):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `phase` | `readonly phase: DataGridLoadingPhase;` |  | `initial` before the first result, `page` while a page change loads, else `refresh` (also `setLoading(true)`). |

### DataGridLoadingRowContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridLoadingRowContext

```ts
interface DataGridLoadingRowContext {
    readonly rowIndex: number;
    readonly status: 'loading' | 'error';
    readonly error: unknown;
    readonly retry: () => void;
}
```

Context of `renderLoadingRow`: a row of a block that is loading or failed to load.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowIndex` | `readonly rowIndex: number;` |  |  |
| `status` | `readonly status: 'loading' \| 'error';` |  |  |
| `error` | `readonly error: unknown;` |  |  |
| `retry` | `readonly retry: () => void;` |  | Retries the failed block load. |

### DataGridMenuItem

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridMenuItem

```ts
interface DataGridMenuItem {
    readonly id: string;
    readonly label?: string;
    readonly icon?: ReactNode;
    readonly disabled?: boolean;
    readonly disabledReason?: string;
    readonly checked?: boolean;
    readonly separator?: boolean;
    readonly items?: readonly DataGridMenuItem[];
    readonly render?: () => ReactNode;
    readonly href?: string;
    readonly target?: string;
    readonly targets?: readonly DataGridContextMenuTarget['kind'][];
}
```

Members (12):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id: string;` |  | Built-in id or a custom id (reported in click events). |
| `label` | `readonly label?: string;` | optional |  |
| `icon` | `readonly icon?: ReactNode;` | optional | Decorative icon (rendered `aria-hidden`). |
| `disabled` | `readonly disabled?: boolean;` | optional |  |
| `disabledReason` | `readonly disabledReason?: string;` | optional | Shown as the item tooltip when disabled. |
| `checked` | `readonly checked?: boolean;` | optional | Renders `menuitemcheckbox` with `aria-checked`. |
| `separator` | `readonly separator?: boolean;` | optional |  |
| `items` | `readonly items?: readonly DataGridMenuItem[];` | optional | Nested submenu. |
| `render` | `readonly render?: () => ReactNode;` | optional | Custom content of the item (the item keeps its role and keyboard behavior). |
| `href` | `readonly href?: string;` | optional | Renders the item as a link (`<a role="menuitem">`). |
| `target` | `readonly target?: string;` | optional | Link target of an `href` item (`_blank`, ...). |
| `targets` | `readonly targets?: readonly DataGridContextMenuTarget['kind'][];` | optional | Context menu only: the target kinds the item shows on (a selector). Omitted: every target. Built-in ids keep their own area (header, content, pager) and ignore it. |

### DataGridMoveTarget

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridMoveTarget

```ts
interface DataGridMoveTarget {
    readonly targetRowId: RowId;
    readonly position: 'before' | 'after' | 'into';
}
```

Target of `moveRows(rowIds, { targetRowId, position })`.

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `targetRowId` | `readonly targetRowId: RowId;` |  |  |
| `position` | `readonly position: 'before' \| 'after' \| 'into';` |  |  |

### DataGridOutputApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridOutputApi

```ts
interface DataGridOutputApi<Row> {
    exportToExcel(options?: DataGridExcelExportOptions<Row>): Promise<ExportFile | null>;
    exportToPdf(options?: DataGridPdfExportOptions<Row>): Promise<ExportFile | null>;
    exportToCsv(options?: DataGridCsvExportOptions<Row>): Promise<ExportFile<string> | null>;
    print(options?: DataGridPrintOptions<Row>): Promise<boolean>;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `exportToExcel` | `exportToExcel(options?: DataGridExcelExportOptions<Row>): Promise<ExportFile \| null>;` |  | XLSX export (`excelExport`); resolves to the file, or null when prevented. Downloads unless `download: false`. |
| `exportToPdf` | `exportToPdf(options?: DataGridPdfExportOptions<Row>): Promise<ExportFile \| null>;` |  | PDF export (`pdfExport`). |
| `exportToCsv` | `exportToCsv(options?: DataGridCsvExportOptions<Row>): Promise<ExportFile<string> \| null>;` |  | CSV export (`csvExport`); no writer package needed. |
| `print` | `print(options?: DataGridPrintOptions<Row>): Promise<boolean>;` |  | Prints the grid (every row of the scope, no virtualization). Resolves false when prevented or outside a browser. |

### DataGridOutputColumn

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridOutputColumn

```ts
interface DataGridOutputColumn {
    printable?: boolean;
}
```

Column fields of export and print.

Members (1):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `printable` | `printable?: boolean;` | optional | `false` leaves the column out of print. Default true. |

### DataGridOutputProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridOutputProps

```ts
interface DataGridOutputProps<Row> {
    exportWriters?: DataGridExportWriters;
    onBeforeExport?: (event: DataGridBeforeExportEvent<Row>) => void;
    onExport?: (event: DataGridExportEvent<Row>) => void;
    printing?: DataGridPrinting<Row>;
    onBeforePrint?: (event: DataGridBeforePrintEvent) => void;
    onAfterPrint?: (event: DataGridAfterPrintEvent) => void;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `exportWriters` | `exportWriters?: DataGridExportWriters;` | optional | Excel and PDF writer loaders; without one the matching toolbar and menu items are disabled. |
| `onBeforeExport` | `onBeforeExport?: (event: DataGridBeforeExportEvent<Row>) => void;` | optional |  |
| `onExport` | `onExport?: (event: DataGridExportEvent<Row>) => void;` | optional |  |
| `printing` | `printing?: DataGridPrinting<Row>;` | optional | Print scope and hierarchy mode (`print()` options override them). |
| `onBeforePrint` | `onBeforePrint?: (event: DataGridBeforePrintEvent) => void;` | optional |  |
| `onAfterPrint` | `onAfterPrint?: (event: DataGridAfterPrintEvent) => void;` | optional |  |

### DataGridPageChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPageChangeEvent

```ts
interface DataGridPageChangeEvent extends DataGridEvent {
    readonly page: number;
    readonly previousPage: number;
    readonly pageSize: number;
    readonly previousPageSize: number;
}
```

`onBeforePageChange` (`type: 'beforePageChange'`) and `onPageChange` (`'pageChange'`).

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `page` | `readonly page: number;` |  |  |
| `previousPage` | `readonly previousPage: number;` |  |  |
| `pageSize` | `readonly pageSize: number;` |  |  |
| `previousPageSize` | `readonly previousPageSize: 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). |

### DataGridPagerContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPagerContext

```ts
interface DataGridPagerContext {
    readonly page: number;
    readonly pageSize: number;
    readonly pageCount: number;
    readonly totalRowCount: number;
    readonly pageSizeOptions: readonly number[];
    goToPage(page: number): void;
    setPageSize(pageSize: number): void;
    readonly defaultPager: ReactNode;
}
```

Context of `renderPager`.

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `page` | `readonly page: number;` |  | Effective 1-based page. |
| `pageSize` | `readonly pageSize: number;` |  |  |
| `pageCount` | `readonly pageCount: number;` |  |  |
| `totalRowCount` | `readonly totalRowCount: number;` |  |  |
| `pageSizeOptions` | `readonly pageSizeOptions: readonly number[];` |  | `paging.pageSizeOptions` with `'all'` resolved to the row count. |
| `goToPage` | `goToPage(page: number): void;` |  |  |
| `setPageSize` | `setPageSize(pageSize: number): void;` |  |  |
| `defaultPager` | `readonly defaultPager: ReactNode;` |  | The built-in pager, to wrap or decorate. |

### DataGridPaging

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPaging

```ts
interface DataGridPaging {
    page?: number;
    pageSize?: number;
    buttonCount?: number;
    pageSizeOptions?: boolean | readonly (number | 'all')[];
    syncUrl?: boolean | {
        readonly param?: string;
    };
    totalRowCount?: number;
}
```

`paging` prop.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `page` | `page?: number;` | optional | 1-based. Default 1. |
| `pageSize` | `pageSize?: number;` | optional | Default 12. |
| `buttonCount` | `buttonCount?: number;` | optional | Numeric page buttons shown at once. Default 8. |
| `pageSizeOptions` | `pageSizeOptions?: boolean \| readonly (number \| 'all')[];` | optional | Page size dropdown: `true` for `['all', 5, 10, 12, 20]`, or the options (`'all'` for every row). Default false. |
| `syncUrl` | `syncUrl?: boolean \| {     readonly param?: string; };` | optional | Keeps the page in the URL query string. Opt-in. After mount the grid reads the parameter (default `page`) and goes to that page, then writes page changes with `history.replaceState` (no history entries). The server renders `page`; pass the parameter as `page` from the request to render the same page on the server. Read on mount only. |
| `totalRowCount` | `totalRowCount?: number;` | optional | Total row count for the pager when the data source pages remotely and reports no total (or a wrong one); wins over the source's total. Reactive. Ignored when paging runs locally. |

### DataGridPdfExportOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPdfExportOptions

```ts
interface DataGridPdfExportOptions<Row> extends DataGridExportOptions<Row> {
    readonly [option: string]: unknown;
}
```

PDF options: the shared options plus the `PdfOptions` of `@salmonui/export/pdf` (`orientation`, `pageSize`, `header`, `footer`, `font`, ...), passed through.

Members (13):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `tree` | `tree?: "all" \| "expanded";` | optional, inherited | Tree mode rows: `expanded` (default) exports the visible rows in pre-order; `all` exports every kept row regardless of expansion (XLSX `outlineCollapsed` then keeps the collapsed state). |
| `pages` | `pages?: "all" \| "current";` | optional, inherited | `all` (default): every page of the current query. `current`: the current page as shown. |
| `includeHiddenColumns` | `includeHiddenColumns?: boolean;` | optional, inherited | Include hidden columns. Default false. |
| `rows` | `rows?: readonly Row[];` | optional, inherited | Rows to export instead of the grid rows (for example the selected rows), with the grid's columns. |
| `columns` | `columns?: readonly ExportColumnOption[];` | optional, inherited | Export-only columns, in order. |
| `fileName` | `fileName?: string;` | optional, inherited | Download name; the format extension is added when missing. Default `export`. |
| `hierarchy` | `hierarchy?: "all" \| "expanded" \| "none";` | optional, inherited | Detail and child-grid rows: `expanded` (default), `all`, or `none`. |
| `cell` | `cell?: ((ctx: ExportCellHookContext<Row>) => void \| ExportCellPatch \| null \| undefined);` | optional, inherited | Per data cell. Not called when unset. |
| `headerCell` | `headerCell?: ((ctx: ExportHeaderCellHookContext<Row>) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per header cell. |
| `aggregateCell` | `aggregateCell?: ((ctx: ExportAggregateCellHookContext) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per aggregate cell (grid footer, group footer, group caption). |
| `groupCaption` | `groupCaption?: ((ctx: ExportGroupCaptionHookContext) => void \| string \| null \| undefined);` | optional, inherited | Group caption text. |
| `detail` | `detail?: ((ctx: ExportDetailContext<Row>) => void \| ExportDetail \| null \| undefined);` | optional, inherited | A detail block written after a data row (text lines or a child table), or null for none. |
| `download` | `download?: boolean;` | optional, inherited | Downloads the file (default true); `false` only resolves it. |

### DataGridPersistState

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPersistState

```ts
interface DataGridPersistState {
    readonly key?: string;
    readonly storage?: DataGridStateStorageAdapter;
    readonly exclude?: readonly DataGridStatePart[];
    readonly version?: number;
    readonly migrate?: (state: Record<string, unknown>, version: number) => DataGridState | null;
}
```

`persistState` settings.

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `key` | `readonly key?: string;` | optional | Storage key. Default `salmon-data-grid:<id>` (the grid `id` prop is then required). |
| `storage` | `readonly storage?: DataGridStateStorageAdapter;` | optional | Storage with `load` / `save` / `remove` (sync or async), for example `@salmonui/data` `createKeyValueStateStorage`. Default: `localStorage`, read only in the browser after mount. |
| `exclude` | `readonly exclude?: readonly DataGridStatePart[];` | optional | State parts that are not saved or restored. |
| `version` | `readonly version?: number;` | optional | Application state version. A stored state saved under another version is discarded unless `migrate` upgrades it. |
| `migrate` | `readonly migrate?: (state: Record<string, unknown>, version: number) => DataGridState \| null;` | optional | Upgrades a stored state of another schema or application version; return null to discard it. |

### DataGridPinnedColumns

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPinnedColumns

```ts
interface DataGridPinnedColumns {
    readonly start?: number;
    readonly end?: number;
}
```

Count shorthand: the first / last N visible columns are pinned.

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `start` | `readonly start?: number;` | optional |  |
| `end` | `readonly end?: number;` | optional |  |

### DataGridPrintOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPrintOptions

```ts
interface DataGridPrintOptions<Row = unknown> extends DataGridPrinting<Row> {
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `scope` | `scope?: "all" \| "page";` | optional, inherited | `all` (default): every page of the current query. `page`: the current page. |
| `hierarchy` | `hierarchy?: ExportHierarchyMode;` | optional, inherited | Detail and child-grid rows: `expanded` (default), `all`, or `none`. |
| `detail` | `detail?: ((ctx: ExportDetailContext<Row>) => void \| ExportDetail \| null \| undefined);` | optional, inherited | A detail block printed after a data row (text lines or a child table), as the export `detail` hook: React detail templates never print by themselves. `undefined` falls back to the child grid (hierarchy), `null` prints none. |
| `tree` | `tree?: "all" \| "expanded";` | optional, inherited | Tree mode: `expanded` (default) prints the visible rows, `all` every kept row; the tree column is indented. |

### DataGridPrinting

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPrinting

```ts
interface DataGridPrinting<Row = unknown> {
    readonly scope?: 'all' | 'page';
    readonly hierarchy?: ExportHierarchyMode;
    readonly detail?: ExportHandlers<Row>['detail'];
    readonly tree?: 'expanded' | 'all';
}
```

Print scope, hierarchy, detail and tree options.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `scope` | `readonly scope?: 'all' \| 'page';` | optional | `all` (default): every page of the current query. `page`: the current page. |
| `hierarchy` | `readonly hierarchy?: ExportHierarchyMode;` | optional | Detail and child-grid rows: `expanded` (default), `all`, or `none`. |
| `detail` | `readonly detail?: ExportHandlers<Row>['detail'];` | optional | A detail block printed after a data row (text lines or a child table), as the export `detail` hook: React detail templates never print by themselves. `undefined` falls back to the child grid (hierarchy), `null` prints none. |
| `tree` | `readonly tree?: 'expanded' \| 'all';` | optional | Tree mode: `expanded` (default) prints the visible rows, `all` every kept row; the tree column is indented. |

### DataGridProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridProps

```ts
interface DataGridProps<Row> extends DataGridChromeProps<Row>, DataGridQueryProps, DataGridEditProps<Row>, DataGridOutputProps<Row>, DataGridAdaptiveProps, DataGridDetailProps<Row>, DataGridRowPinningProps<Row>, DataGridDataUiProps<Row>, DataGridFilterBuilderProps, DataGridTreeProps<Row> {
    data?: readonly Row[] | DataSource<Row>;
    columns?: readonly DataGridColumn<Row>[];
    children?: ReactNode;
    getRowId?: (row: Row) => RowId | number;
    modules?: readonly DataGridModule<Row>[];
    features?: readonly DataGridFeature[];
    locale?: string;
    timeZone?: string;
    currency?: string;
    dir?: 'ltr' | 'rtl' | 'auto';
    height?: number | string;
    width?: number | string;
    rowHeight?: number;
    getRowHeight?: (row: Row) => number;
    estimatedRowHeight?: number;
    headerHeight?: number;
    defaultColumnWidth?: number;
    virtualization?: boolean | DataGridVirtualization;
    infiniteScroll?: boolean | DataGridInfiniteScroll<Row>;
    renderLoadingRow?: (ctx: DataGridLoadingRowContext) => ReactNode;
    initialRows?: number;
    initialColumns?: number;
    textWrap?: DataGridTextWrap;
    gridLines?: DataGridLines;
    overflow?: DataGridOverflow;
    highlightOnHover?: boolean;
    striped?: boolean;
    resizable?: boolean;
    resizeMode?: 'normal' | 'auto';
    reorderable?: boolean;
    onBeforeColumnVisibilityChange?: (event: DataGridColumnVisibilityChangeEvent) => void;
    onColumnVisibilityChange?: (event: DataGridColumnVisibilityChangeEvent) => void;
    onBeforeColumnReorder?: (event: DataGridColumnReorderEvent) => void;
    onColumnReorder?: (event: DataGridColumnReorderEvent) => void;
    grouping?: boolean | DataGridGrouping<Row>;
    onBeforeGroupChange?: (event: DataGridGroupChangeEvent) => void;
    onGroupChange?: (event: DataGridGroupChangeEvent) => void;
    onBeforeGroupToggle?: (event: DataGridGroupToggleEvent<Row>) => void;
    onGroupToggle?: (event: DataGridGroupToggleEvent<Row>) => void;
    aggregates?: readonly DataGridAggregateRow<Row>[];
    aggregateScope?: 'page' | 'all';
    renderRow?: (ctx: DataGridRowContext<Row>) => ReactNode;
    renderEmpty?: (ctx: DataGridEmptyContext) => ReactNode;
    renderError?: (ctx: DataGridDataErrorContext) => ReactNode;
    onViewChange?: (event: DataGridViewChangeEvent) => void;
    getRowProps?: (row: Row, rowIndex: number, ctx: {
        readonly tree?: DataGridTreeContext;
    }) => DataGridElementProps | undefined;
    rowClassName?: (row: Row, rowIndex: number) => string | undefined;
    getCellProps?: (ctx: DataGridCellContext<Row>) => DataGridElementProps | undefined;
    className?: string;
    style?: CSSProperties;
    classNames?: Partial<Record<DataGridPart, string>>;
    styles?: Partial<Record<DataGridPart, CSSProperties>>;
    icons?: DataGridIcons | undefined;
    ref?: Ref<DataGridApi<Row>>;
    id?: string;
    'aria-label'?: string;
    'aria-labelledby'?: string;
    'aria-describedby'?: string;
    onWarning?: (warning: DataGridWarning) => void;
    onReady?: (api: DataGridApi<Row>) => void;
    selection?: boolean | DataGridSelection;
    onBeforeSelectionChange?: (event: DataGridSelectionChangeEvent<Row>) => void;
    onSelectionChange?: (event: DataGridSelectionChangeEvent<Row>) => void;
    keyBindings?: Readonly<Record<string, readonly string[]>>;
    onKeyDown?: (ctx: DataGridKeyDownContext) => void;
    localeText?: DataGridLocaleText;
    persistState?: boolean | DataGridPersistState;
}
```

Members (163):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `data` | `data?: readonly Row[] \| DataSource<Row>;` | optional | Rows (reactive: a new array replaces the rows) or a `DataSource` (read once on mount). |
| `columns` | `columns?: readonly DataGridColumn<Row>[];` | optional | Column definitions; `<DataGridColumn>` children are the JSX form (children win over `columns`). |
| `children` | `children?: ReactNode;` | optional | `<DataGridColumn>` and `<DataGridAggregateRow>` elements. |
| `getRowId` | `getRowId?: (row: Row) => RowId \| number;` | optional | Row identity. Default: the `primaryKey` column(s), else the `id` field (with a development warning). |
| `modules` | `modules?: readonly DataGridModule<Row>[];` | optional | Extra core modules (initial only). |
| `features` | `features?: readonly DataGridFeature[];` | optional | *Salmon*. Render features to use synchronously, from `@salmonui/data-grid/features`. Optional: a grid loads the features its props need on demand; features passed here skip that load (no placeholder on a client-only render). Read at creation. |
| `locale` | `locale?: string;` | optional |  |
| `timeZone` | `timeZone?: string;` | optional | IANA time zone for date formatting. Set it for SSR: server and client must format identically. |
| `currency` | `currency?: string;` | optional |  |
| `dir` | `dir?: 'ltr' \| 'rtl' \| 'auto';` | optional | Text direction. `'auto'` follows the `locale` script (`ar`, `he`, `fa`, ... are right-to-left). Default: the inherited `dir`. Reactive. |
| `height` | `height?: number \| string;` | optional | Viewport height: px, any CSS length (`'100%'` needs a fixed-height parent), or `'auto'` (no row virtualization). Default 400. |
| `width` | `width?: number \| string;` | optional |  |
| `rowHeight` | `rowHeight?: number;` | optional | Fixed row height in px. Default 36. |
| `getRowHeight` | `getRowHeight?: (row: Row) => number;` | optional | Per-row fixed height. |
| `estimatedRowHeight` | `estimatedRowHeight?: number;` | optional | Enables measured row heights with this estimate (variable content, templates, wrapping). |
| `headerHeight` | `headerHeight?: number;` | optional | Header row height in px (per stacked level). Default 40. |
| `defaultColumnWidth` | `defaultColumnWidth?: number;` | optional | Width of columns without `width`. Default 160. |
| `virtualization` | `virtualization?: boolean \| DataGridVirtualization;` | optional | Row and column virtualization; `true` (default) for the defaults, `false` renders every row and column. |
| `infiniteScroll` | `infiniteScroll?: boolean \| DataGridInfiniteScroll<Row>;` | optional | Infinite scrolling for remote sources: rows load in blocks as the viewport approaches them. |
| `renderLoadingRow` | `renderLoadingRow?: (ctx: DataGridLoadingRowContext) => ReactNode;` | optional | Placeholder row while its block loads, or after the load failed. Default: the loading text, or the error and a Retry button. |
| `initialRows` | `initialRows?: number;` | optional | Rows in the deterministic server/initial range. Default 20. |
| `initialColumns` | `initialColumns?: number;` | optional | Center columns in the deterministic server/initial range. Default 20. |
| `textWrap` | `textWrap?: DataGridTextWrap;` | optional |  |
| `gridLines` | `gridLines?: DataGridLines;` | optional |  |
| `overflow` | `overflow?: DataGridOverflow;` | optional | Default text overflow of every column. Default `ellipsis`. |
| `highlightOnHover` | `highlightOnHover?: boolean;` | optional | Row hover highlight. Default true. |
| `striped` | `striped?: boolean;` | optional | Alternate row shading. Default true. |
| `resizable` | `resizable?: boolean;` | optional | Pointer and keyboard column resize. Default false; column `resizable` refines it. |
| `resizeMode` | `resizeMode?: 'normal' \| 'auto';` | optional | Column fit. `'normal'` (default): widths are kept, leaving empty space or scrolling. `'auto'`: when the columns are narrower than the grid they stretch proportionally to fill it, and a pointer resize re-fits the other columns. |
| `reorderable` | `reorderable?: boolean;` | optional | Pointer and keyboard column reorder. Default false; column `reorderable` refines it. |
| `onBeforeColumnVisibilityChange` | `onBeforeColumnVisibilityChange?: (event: DataGridColumnVisibilityChangeEvent) => void;` | optional |  |
| `onColumnVisibilityChange` | `onColumnVisibilityChange?: (event: DataGridColumnVisibilityChangeEvent) => void;` | optional |  |
| `onBeforeColumnReorder` | `onBeforeColumnReorder?: (event: DataGridColumnReorderEvent) => void;` | optional |  |
| `onColumnReorder` | `onColumnReorder?: (event: DataGridColumnReorderEvent) => void;` | optional |  |
| `grouping` | `grouping?: boolean \| DataGridGrouping<Row>;` | optional | `true` or settings: grouping UI and behavior. |
| `onBeforeGroupChange` | `onBeforeGroupChange?: (event: DataGridGroupChangeEvent) => void;` | optional |  |
| `onGroupChange` | `onGroupChange?: (event: DataGridGroupChangeEvent) => void;` | optional |  |
| `onBeforeGroupToggle` | `onBeforeGroupToggle?: (event: DataGridGroupToggleEvent<Row>) => void;` | optional |  |
| `onGroupToggle` | `onGroupToggle?: (event: DataGridGroupToggleEvent<Row>) => void;` | optional |  |
| `aggregates` | `aggregates?: readonly DataGridAggregateRow<Row>[];` | optional | Aggregate rows (or `<DataGridAggregateRow>` children). |
| `aggregateScope` | `aggregateScope?: 'page' \| 'all';` | optional | With paging: `page` (default) aggregates the current page, `all` every matching row. |
| `renderRow` | `renderRow?: (ctx: DataGridRowContext<Row>) => ReactNode;` | optional |  |
| `renderEmpty` | `renderEmpty?: (ctx: DataGridEmptyContext) => ReactNode;` | optional |  |
| `renderError` | `renderError?: (ctx: DataGridDataErrorContext) => ReactNode;` | optional | Body content while the data source failed to load. Default: the error message and a Retry button. |
| `onViewChange` | `onViewChange?: (event: DataGridViewChangeEvent) => void;` | optional | Once per committed change of the displayed rows; never on scroll, focus, selection, or expansion. |
| `getRowProps` | `getRowProps?: (row: Row, rowIndex: number, ctx: {     readonly tree?: DataGridTreeContext; }) => DataGridElementProps \| undefined;` | optional | Called for rendered rows only; `ctx.tree` in tree mode. |
| `rowClassName` | `rowClassName?: (row: Row, rowIndex: number) => string \| undefined;` | optional |  |
| `getCellProps` | `getCellProps?: (ctx: DataGridCellContext<Row>) => DataGridElementProps \| undefined;` | optional | Called for rendered cells only. |
| `className` | `className?: string;` | optional |  |
| `style` | `style?: CSSProperties;` | optional |  |
| `classNames` | `classNames?: Partial<Record<DataGridPart, string>>;` | optional |  |
| `styles` | `styles?: Partial<Record<DataGridPart, CSSProperties>>;` | optional |  |
| `icons` | `icons?: DataGridIcons \| undefined;` | optional | Icon overrides by name: a node replaces the built-in SVG icon, `null` hides it. Merges over an enclosing `DataGridIconsProvider`. A component prop, not a theme input. |
| `ref` | `ref?: Ref<DataGridApi<Row>>;` | optional | Receives the grid instance; the root element is `api.element`. |
| `id` | `id?: string;` | optional |  |
| `aria-label` | `'aria-label'?: string;` | optional |  |
| `aria-labelledby` | `'aria-labelledby'?: string;` | optional |  |
| `aria-describedby` | `'aria-describedby'?: string;` | optional |  |
| `onWarning` | `onWarning?: (warning: DataGridWarning) => void;` | optional |  |
| `onReady` | `onReady?: (api: DataGridApi<Row>) => void;` | optional | Fires once after the first commit with the instance. |
| `selection` | `selection?: boolean \| DataGridSelection;` | optional | Selection. On by default: single row selection. `false` turns it off. |
| `onBeforeSelectionChange` | `onBeforeSelectionChange?: (event: DataGridSelectionChangeEvent<Row>) => void;` | optional | Cancel with `event.preventDefault()`. |
| `onSelectionChange` | `onSelectionChange?: (event: DataGridSelectionChangeEvent<Row>) => void;` | optional |  |
| `keyBindings` | `keyBindings?: Readonly<Record<string, readonly string[]>>;` | optional | Replaces the combos of keyboard commands (`{ 'selection.selectAll': ['Mod+Shift+L'] }`). Reactive: a changed value (compared by value) rebuilds the keymap. |
| `onKeyDown` | `onKeyDown?: (ctx: DataGridKeyDownContext) => void;` | optional | Called for every key pressed in the grid before the built-in binding runs. |
| `localeText` | `localeText?: DataGridLocaleText;` | optional | Text overrides over the English catalog (`DATA_GRID_DEFAULT_LOCALE_TEXT`): every visible and assistive string of the grid. Plain JSON with `{param}` templates and plural forms. Reactive. |
| `persistState` | `persistState?: boolean \| DataGridPersistState;` | optional | Saves the user's grid state (column order, widths, visibility, pinning, sorting, filters, grouping, page, search, selection, scroll) and restores it on mount. `true` uses `localStorage` under `salmon-data-grid:<id>` (set `id`); an object sets the key, storage, excluded parts, and an application version. Read on mount. |
| `pinnedColumns` | `pinnedColumns?: DataGridPinnedColumns;` | optional, inherited | The first / last N visible columns are pinned. Reactive. |
| `stickyRows` | `stickyRows?: number;` | optional, inherited | The first N rows of the visible row model stick below the header. |
| `stickyBottomRows` | `stickyBottomRows?: number;` | optional, inherited | The last N rows of the visible row model stick above the footer. |
| `onBeforeColumnPinChange` | `onBeforeColumnPinChange?: ((event: DataGridColumnPinChangeEvent) => void);` | optional, inherited |  |
| `onColumnPinChange` | `onColumnPinChange?: ((event: DataGridColumnPinChangeEvent) => void);` | optional, inherited |  |
| `mergeCells` | `mergeCells?: DataGridMergeCells;` | optional, inherited | DataGrid-wide merging of equal adjacent values (row merging also works under row virtualization). |
| `columnMenu` | `columnMenu?: boolean \| readonly (DataGridMenuItem \| DataGridColumnMenuItemId)[];` | optional, inherited | Column menu; an array lists the items in order (built-in ids or custom items). `column.menu: false` opts a column out. |
| `onBeforeColumnMenuOpen` | `onBeforeColumnMenuOpen?: ((event: DataGridColumnMenuOpenEvent<Row>) => void);` | optional, inherited |  |
| `onBeforeColumnMenuClose` | `onBeforeColumnMenuClose?: ((event: DataGridColumnMenuCloseEvent<Row>) => void);` | optional, inherited |  |
| `onColumnMenuItemClick` | `onColumnMenuItemClick?: ((event: DataGridColumnMenuItemClickEvent<Row>) => void);` | optional, inherited |  |
| `renderColumnMenu` | `renderColumnMenu?: ((ctx: DataGridColumnMenuContext<Row>) => ReactNode);` | optional, inherited |  |
| `columnChooser` | `columnChooser?: boolean \| DataGridColumnChooser<Row>;` | optional, inherited |  |
| `onBeforeColumnChooserOpen` | `onBeforeColumnChooserOpen?: ((event: DataGridColumnChooserOpenEvent<Row>) => void);` | optional, inherited |  |
| `toolbar` | `toolbar?: readonly (DataGridToolbarItem \| DataGridToolbarItemId)[];` | optional, inherited |  |
| `onToolbarItemClick` | `onToolbarItemClick?: ((event: DataGridToolbarItemClickEvent) => void);` | optional, inherited |  |
| `renderToolbar` | `renderToolbar?: ((ctx: DataGridToolbarContext<Row>) => ReactNode);` | optional, inherited |  |
| `contextMenu` | `contextMenu?: boolean \| readonly (DataGridMenuItem \| DataGridContextMenuItemId)[];` | optional, inherited | Context menu; an array lists the items in order. Items that do not apply to the target are dropped. |
| `onBeforeContextMenuOpen` | `onBeforeContextMenuOpen?: ((event: DataGridContextMenuOpenEvent) => void);` | optional, inherited |  |
| `onBeforeContextMenuClose` | `onBeforeContextMenuClose?: ((event: DataGridContextMenuCloseEvent) => void);` | optional, inherited |  |
| `onContextMenuItemClick` | `onContextMenuItemClick?: ((event: DataGridContextMenuItemClickEvent<Row>) => void);` | optional, inherited |  |
| `renderContextMenu` | `renderContextMenu?: ((ctx: DataGridContextMenuContext) => ReactNode);` | optional, inherited |  |
| `onColumnResizeStart` | `onColumnResizeStart?: ((event: DataGridColumnResizeEvent) => void);` | optional, inherited |  |
| `onColumnResize` | `onColumnResize?: ((event: DataGridColumnResizeEvent) => void);` | optional, inherited |  |
| `onColumnResizeEnd` | `onColumnResizeEnd?: ((event: DataGridColumnResizeEvent) => void);` | optional, inherited |  |
| `onColumnDragStart` | `onColumnDragStart?: ((event: DataGridColumnDragEvent) => void);` | optional, inherited |  |
| `onColumnDrag` | `onColumnDrag?: ((event: DataGridColumnDragEvent) => void);` | optional, inherited |  |
| `onColumnDrop` | `onColumnDrop?: ((event: DataGridColumnDragEvent) => void);` | optional, inherited |  |
| `adaptive` | `adaptive?: boolean \| DataGridAdaptive;` | optional, inherited | Adaptive UI (`enableAdaptiveUI`, `adaptiveUIMode`, `rowRenderingMode`): full-screen sheets for menus and dialogs, 44 px touch targets, touch long-press, and optional vertical (card) rows. `true` is `{ target: 'both' }`. |
| `onBeforeAdaptiveDialogOpen` | `onBeforeAdaptiveDialogOpen?: ((event: DataGridAdaptiveDialogOpenEvent) => void);` | optional, inherited |  |
| `onBeforeCopy` | `onBeforeCopy?: ((event: DataGridBeforeCopyEvent) => void);` | optional, inherited |  |
| `onBeforePaste` | `onBeforePaste?: ((event: DataGridBeforePasteEvent) => void);` | optional, inherited |  |
| `onBeforeFill` | `onBeforeFill?: ((event: DataGridBeforeFillEvent) => void);` | optional, inherited |  |
| `editing` | `editing?: boolean \| DataGridEditing<Row>;` | optional, inherited | Editing. `true` for the defaults (row mode). The module is registered when the initial value is set. |
| `onBeforeEditStart` | `onBeforeEditStart?: ((event: DataGridEditStartEvent<Row>) => void);` | optional, inherited |  |
| `onEditStart` | `onEditStart?: ((event: DataGridEditStartEvent<Row>) => void);` | optional, inherited |  |
| `onBeforeCellValueChange` | `onBeforeCellValueChange?: ((event: DataGridCellValueChangeEvent) => void);` | optional, inherited |  |
| `onCellValueChange` | `onCellValueChange?: ((event: DataGridCellValueChangeEvent) => void);` | optional, inherited |  |
| `onBeforeSave` | `onBeforeSave?: ((event: DataGridSaveEvent<Row>) => void);` | optional, inherited |  |
| `onSave` | `onSave?: ((event: DataGridSaveEvent<Row>) => void);` | optional, inherited |  |
| `onBeforeAdd` | `onBeforeAdd?: ((event: DataGridAddEvent<Row>) => void);` | optional, inherited |  |
| `onAdd` | `onAdd?: ((event: DataGridAddEvent<Row>) => void);` | optional, inherited |  |
| `onBeforeDelete` | `onBeforeDelete?: ((event: DataGridDeleteEvent<Row>) => void);` | optional, inherited |  |
| `onDelete` | `onDelete?: ((event: DataGridDeleteEvent<Row>) => void);` | optional, inherited |  |
| `onBeforeEditCancel` | `onBeforeEditCancel?: ((event: DataGridEditCancelEvent) => void);` | optional, inherited |  |
| `onEditCancel` | `onEditCancel?: ((event: DataGridEditCancelEvent) => void);` | optional, inherited |  |
| `onCommandClick` | `onCommandClick?: ((event: DataGridCommandClickEvent<Row>) => void);` | optional, inherited |  |
| `sorting` | `sorting?: boolean \| DataGridSorting;` | optional, inherited | `true` or options: header sorting. |
| `filtering` | `filtering?: boolean \| DataGridFiltering;` | optional, inherited | `true` or options: filtering and its UI. |
| `search` | `search?: boolean \| DataGridSearch;` | optional, inherited | `true` or options: searching. |
| `paging` | `paging?: boolean \| DataGridPaging;` | optional, inherited | `true` or options: paging and the pager. |
| `renderPager` | `renderPager?: ((ctx: DataGridPagerContext) => ReactNode);` | optional, inherited | Replaces the pager. |
| `onBeforeSortChange` | `onBeforeSortChange?: ((event: DataGridSortChangeEvent) => void);` | optional, inherited |  |
| `onSortChange` | `onSortChange?: ((event: DataGridSortChangeEvent) => void);` | optional, inherited |  |
| `onBeforeFilterChange` | `onBeforeFilterChange?: ((event: DataGridFilterChangeEvent) => void);` | optional, inherited |  |
| `onFilterChange` | `onFilterChange?: ((event: DataGridFilterChangeEvent) => void);` | optional, inherited |  |
| `onBeforeFilterMenuOpen` | `onBeforeFilterMenuOpen?: ((event: DataGridFilterMenuOpenEvent) => void);` | optional, inherited |  |
| `onFilterMenuOpen` | `onFilterMenuOpen?: ((event: DataGridFilterMenuOpenEvent) => void);` | optional, inherited |  |
| `onBeforeSearchChange` | `onBeforeSearchChange?: ((event: DataGridSearchChangeEvent) => void);` | optional, inherited |  |
| `onSearchChange` | `onSearchChange?: ((event: DataGridSearchChangeEvent) => void);` | optional, inherited |  |
| `onBeforePageChange` | `onBeforePageChange?: ((event: DataGridPageChangeEvent) => void);` | optional, inherited |  |
| `onPageChange` | `onPageChange?: ((event: DataGridPageChangeEvent) => void);` | optional, inherited |  |
| `onError` | `onError?: ((event: DataGridErrorEvent) => void);` | optional, inherited | An action was rejected (unknown column, page out of range, ...). |
| `renderDetail` | `renderDetail?: ((ctx: DataGridDetailContext<Row>) => ReactNode);` | optional, inherited | Detail row content below each expanded row. |
| `detailHeight` | `detailHeight?: number;` | optional, inherited | Estimated detail row height in px before measurement. Default 150. |
| `hasDetail` | `hasDetail?: ((row: Row) => boolean);` | optional, inherited | Rows without a detail (no toggle). Called for rendered rows only. |
| `loadDetail` | `loadDetail?: ((ctx: DataGridDetailLoadContext<Row>) => unknown);` | optional, inherited | Async detail content, started on expand; `renderDetail` receives `status`, `data`, `error`. |
| `defaultExpandedDetails` | `defaultExpandedDetails?: boolean \| readonly string[];` | optional, inherited | Initially expanded details: `true` for every row, or row ids (initial only). |
| `childGrid` | `childGrid?: DataGridChildGrid<unknown, Row>;` | optional, inherited | Child grid inside each expanded row (hierarchy grid). An inline object sees child rows as `unknown`; `defineChildGrid<Child, Parent>(config)` types the child rows. |
| `onBeforeDetailToggle` | `onBeforeDetailToggle?: ((event: DataGridDetailToggleEvent<Row>) => void);` | optional, inherited |  |
| `onDetailToggle` | `onDetailToggle?: ((event: DataGridDetailToggleEvent<Row>) => void);` | optional, inherited |  |
| `rowDrag` | `rowDrag?: boolean \| DataGridRowDrag;` | optional, inherited | Row drag and drop with a drag handle column; `true` reorders within the grid. |
| `onRowDragStart` | `onRowDragStart?: ((event: DataGridRowDragEvent<Row>) => void);` | optional, inherited | Cancel with `event.preventDefault()`. |
| `onRowDrag` | `onRowDrag?: ((event: DataGridRowDragEvent<Row>) => void);` | optional, inherited | Once per animation frame while dragging. |
| `onBeforeRowDrop` | `onBeforeRowDrop?: ((event: DataGridRowDragEvent<Row>) => void);` | optional, inherited | Cancel with `event.preventDefault()`. |
| `onRowDrop` | `onRowDrop?: ((event: DataGridRowDragEvent<Row>) => void);` | optional, inherited |  |
| `renderRowDragPreview` | `renderRowDragPreview?: ((ctx: DataGridRowDragPreviewContext<Row>) => ReactNode);` | optional, inherited | Drag preview content (default: the first cell text and the row count). |
| `exportWriters` | `exportWriters?: DataGridExportWriters;` | optional, inherited | Excel and PDF writer loaders; without one the matching toolbar and menu items are disabled. |
| `onBeforeExport` | `onBeforeExport?: ((event: DataGridBeforeExportEvent<Row>) => void);` | optional, inherited |  |
| `onExport` | `onExport?: ((event: DataGridExportEvent<Row>) => void);` | optional, inherited |  |
| `printing` | `printing?: DataGridPrinting<Row>;` | optional, inherited | Print scope and hierarchy mode (`print()` options override them). |
| `onBeforePrint` | `onBeforePrint?: ((event: DataGridBeforePrintEvent) => void);` | optional, inherited |  |
| `onAfterPrint` | `onAfterPrint?: ((event: DataGridAfterPrintEvent) => void);` | optional, inherited |  |
| `loadingIndicator` | `loadingIndicator?: "skeleton" \| "spinner";` | optional, inherited | Built-in loading indicator. Default `spinner`. |
| `renderLoading` | `renderLoading?: ((ctx: DataGridLoadingContext) => ReactNode);` | optional, inherited | Replaces the content of the loading indicator (presentational: the grid announces loading itself). |
| `onRowClick` | `onRowClick?: ((event: DataGridRowClickEvent<Row>) => void);` | optional, inherited | A data row was clicked. `preventDefault()` skips the built-in selection and focus. |
| `onRowDoubleClick` | `onRowDoubleClick?: ((event: DataGridRowClickEvent<Row>) => void);` | optional, inherited | A data row was double-clicked. `preventDefault()` skips the built-in edit start. |
| `onCellClick` | `onCellClick?: ((event: DataGridCellClickEvent<Row>) => void);` | optional, inherited | A cell of a data row was clicked; fires before `onRowClick`. |
| `onCellDoubleClick` | `onCellDoubleClick?: ((event: DataGridCellClickEvent<Row>) => void);` | optional, inherited | A cell of a data row was double-clicked; fires before `onRowDoubleClick`. |
| `recordCommands` | `recordCommands?: boolean;` | optional, inherited | Keeps a serializable log of applied commands (`api.engine.getCommandLog()`). Initial only. Default false. |
| `instrument` | `instrument?: boolean;` | optional, inherited | Exposes store counters (`api.engine.getInstrumentation()`). Initial only. Default false. |
| `tree` | `tree?: boolean \| DataGridTree<Row>;` | optional, inherited | Tree mode: rows with children, indented in the tree column. Read at creation (its options are reactive). |
| `onBeforeTreeToggle` | `onBeforeTreeToggle?: ((event: DataGridTreeToggleEvent<Row>) => void);` | optional, inherited |  |
| `onTreeToggle` | `onTreeToggle?: ((event: DataGridTreeToggleEvent<Row>) => void);` | optional, inherited |  |
| `isRowPinned` | `isRowPinned?: ((row: Row) => boolean);` | optional, inherited | Rows pinned to the top zone. Pinned rows stay visible above the scrolling rows on every page, are left out of `pageSize`, and follow sorting, filtering, search and edits. Pure; read once when the grid is created. Turns row pinning on. |
| `defaultPinnedRows` | `defaultPinnedRows?: readonly string[];` | optional, inherited | Initially pinned row ids (initial only). Turns row pinning on; pass `[]` to only use `pinRows`. |
| `onBeforeFilterBuilderOpen` | `onBeforeFilterBuilderOpen?: ((event: DataGridFilterBuilderOpenEvent) => void);` | optional, inherited |  |

### DataGridQueryApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridQueryApi

```ts
interface DataGridQueryApi {
    sortColumn(field: string, direction: DataGridSortDirection, options?: {
        multiple?: boolean;
    }): DataGridActionResult;
    removeSort(field: string): DataGridActionResult;
    clearSorting(): DataGridActionResult;
    filterColumn(field: string, operator: DataGridFilterOperator, value: Json, options?: {
        logic?: 'and' | 'or';
        matchCase?: boolean;
        ignoreAccents?: boolean;
    }): DataGridActionResult;
    removeFilter(field: string): DataGridActionResult;
    clearFiltering(fields?: string | readonly string[]): DataGridActionResult;
    search(text: string): DataGridActionResult;
    clearSearch(): DataGridActionResult;
    goToPage(page: number): DataGridActionResult;
    setPageSize(pageSize: number): DataGridActionResult;
}
```

Query methods of `DataGridApi`.

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `sortColumn` | `sortColumn(field: string, direction: DataGridSortDirection, options?: {     multiple?: boolean; }): DataGridActionResult;` |  | Sorts by a column; `multiple` adds it to a multi-column sort. |
| `removeSort` | `removeSort(field: string): DataGridActionResult;` |  |  |
| `clearSorting` | `clearSorting(): DataGridActionResult;` |  |  |
| `filterColumn` | `filterColumn(field: string, operator: DataGridFilterOperator, value: Json, options?: {     logic?: 'and' \| 'or';     matchCase?: boolean;     ignoreAccents?: boolean; }): DataGridActionResult;` |  | Replaces the column's top-level conditions with one condition (an array value with a scalar operator ORs one condition per value). |
| `removeFilter` | `removeFilter(field: string): DataGridActionResult;` |  | Removes the filters of one column. |
| `clearFiltering` | `clearFiltering(fields?: string \| readonly string[]): DataGridActionResult;` |  | Removes the filters of the given columns, or every filter. |
| `search` | `search(text: string): DataGridActionResult;` |  |  |
| `clearSearch` | `clearSearch(): DataGridActionResult;` |  |  |
| `goToPage` | `goToPage(page: number): DataGridActionResult;` |  |  |
| `setPageSize` | `setPageSize(pageSize: number): DataGridActionResult;` |  |  |

### DataGridQueryColumn

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridQueryColumn

```ts
interface DataGridQueryColumn<Row> {
    readonly filter?: DataGridColumnFilter;
    readonly renderFilter?: (ctx: DataGridFilterContext<Row>) => ReactNode;
    readonly renderFilterCell?: (ctx: DataGridFilterContext<Row>) => ReactNode;
}
```

Column additions of the query UI.

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `filter` | `readonly filter?: DataGridColumnFilter;` | optional |  |
| `renderFilter` | `readonly renderFilter?: (ctx: DataGridFilterContext<Row>) => ReactNode;` | optional |  |
| `renderFilterCell` | `readonly renderFilterCell?: (ctx: DataGridFilterContext<Row>) => ReactNode;` | optional |  |

### DataGridQueryProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridQueryProps

```ts
interface DataGridQueryProps {
    sorting?: boolean | DataGridSorting;
    filtering?: boolean | DataGridFiltering;
    search?: boolean | DataGridSearch;
    paging?: boolean | DataGridPaging;
    renderPager?: (ctx: DataGridPagerContext) => ReactNode;
    onBeforeSortChange?: (event: DataGridSortChangeEvent) => void;
    onSortChange?: (event: DataGridSortChangeEvent) => void;
    onBeforeFilterChange?: (event: DataGridFilterChangeEvent) => void;
    onFilterChange?: (event: DataGridFilterChangeEvent) => void;
    onBeforeFilterMenuOpen?: (event: DataGridFilterMenuOpenEvent) => void;
    onFilterMenuOpen?: (event: DataGridFilterMenuOpenEvent) => void;
    onBeforeSearchChange?: (event: DataGridSearchChangeEvent) => void;
    onSearchChange?: (event: DataGridSearchChangeEvent) => void;
    onBeforePageChange?: (event: DataGridPageChangeEvent) => void;
    onPageChange?: (event: DataGridPageChangeEvent) => void;
    onError?: (event: DataGridErrorEvent) => void;
}
```

Members (16):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `sorting` | `sorting?: boolean \| DataGridSorting;` | optional | `true` or options: header sorting. |
| `filtering` | `filtering?: boolean \| DataGridFiltering;` | optional | `true` or options: filtering and its UI. |
| `search` | `search?: boolean \| DataGridSearch;` | optional | `true` or options: searching. |
| `paging` | `paging?: boolean \| DataGridPaging;` | optional | `true` or options: paging and the pager. |
| `renderPager` | `renderPager?: (ctx: DataGridPagerContext) => ReactNode;` | optional | Replaces the pager. |
| `onBeforeSortChange` | `onBeforeSortChange?: (event: DataGridSortChangeEvent) => void;` | optional |  |
| `onSortChange` | `onSortChange?: (event: DataGridSortChangeEvent) => void;` | optional |  |
| `onBeforeFilterChange` | `onBeforeFilterChange?: (event: DataGridFilterChangeEvent) => void;` | optional |  |
| `onFilterChange` | `onFilterChange?: (event: DataGridFilterChangeEvent) => void;` | optional |  |
| `onBeforeFilterMenuOpen` | `onBeforeFilterMenuOpen?: (event: DataGridFilterMenuOpenEvent) => void;` | optional |  |
| `onFilterMenuOpen` | `onFilterMenuOpen?: (event: DataGridFilterMenuOpenEvent) => void;` | optional |  |
| `onBeforeSearchChange` | `onBeforeSearchChange?: (event: DataGridSearchChangeEvent) => void;` | optional |  |
| `onSearchChange` | `onSearchChange?: (event: DataGridSearchChangeEvent) => void;` | optional |  |
| `onBeforePageChange` | `onBeforePageChange?: (event: DataGridPageChangeEvent) => void;` | optional |  |
| `onPageChange` | `onPageChange?: (event: DataGridPageChangeEvent) => void;` | optional |  |
| `onError` | `onError?: (event: DataGridErrorEvent) => void;` | optional | An action was rejected (unknown column, page out of range, ...). |

### DataGridRestoreResult

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRestoreResult

```ts
interface RestoreResult {
    readonly status: 'applied' | 'partial';
    readonly ignoredColumns: readonly string[];
    readonly rejected: readonly {
        readonly type: string;
        readonly reason: string;
    }[];
    readonly skipped: readonly DataGridStatePart[];
    readonly scroll: {
        readonly top: number;
        readonly left: number;
    } | null;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `status` | `readonly status: 'applied' \| 'partial';` |  |  |
| `ignoredColumns` | `readonly ignoredColumns: readonly string[];` |  | Fields or ids in the state that match no column (dropped). |
| `rejected` | `readonly rejected: readonly {     readonly type: string;     readonly reason: string; }[];` |  | Commands the engine rejected. |
| `skipped` | `readonly skipped: readonly DataGridStatePart[];` |  | Parts that could not be restored because their module is not registered. |
| `scroll` | `readonly scroll: {     readonly top: number;     readonly left: number; } \| null;` |  | Scroll offset for the renderer to apply (scroll is renderer state). |

### DataGridRowClickEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRowClickEvent

```ts
interface DataGridRowClickEvent<Row> extends DataGridEvent {
    readonly rowId: RowId;
    readonly row: Row;
    readonly rowIndex: number;
    readonly field: string | null;
    readonly column: DataGridColumnInfo<Row> | null;
    readonly element: HTMLElement;
    readonly nativeEvent: MouseEvent;
}
```

`onRowClick` / `onRowDoubleClick`. `preventDefault()` cancels the built-in action.

Members (11):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row;` |  |  |
| `rowIndex` | `readonly rowIndex: number;` |  | Visible index of the row. |
| `field` | `readonly field: string \| null;` |  | Column key of the clicked cell, or null outside a cell. |
| `column` | `readonly column: DataGridColumnInfo<Row> \| null;` |  |  |
| `element` | `readonly element: HTMLElement;` |  | The row element. |
| `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). |

### DataGridRowContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRowContext

```ts
interface DataGridRowContext<Row> {
    row: Row;
    rowId: RowId;
    rowIndex: number;
    defaultRow: ReactElement;
    rowProps: DataGridRowElementProps;
    cells: ReactNode;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `row` | `row: Row;` |  |  |
| `rowId` | `rowId: RowId;` |  |  |
| `rowIndex` | `rowIndex: number;` |  |  |
| `defaultRow` | `defaultRow: ReactElement;` |  | The default row element; return it, wrap its cells, or render `rowProps` + `cells` yourself. |
| `rowProps` | `rowProps: DataGridRowElementProps;` |  |  |
| `cells` | `cells: ReactNode;` |  | The row's cells (pinned zones included), to place inside a custom row element. |

### DataGridRowDrag

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRowDrag

```ts
interface DataGridRowDrag {
    readonly targetId?: string;
    readonly acrossGroups?: boolean;
    readonly orderField?: string;
    readonly handoff?: RowDragHandoff;
}
```

`rowDrag` prop.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `targetId` | `readonly targetId?: string;` | optional | Drop into another grid (its `id`) or onto a custom element (its `id`). Default: reorder within the grid. |
| `acrossGroups` | `readonly acrossGroups?: boolean;` | optional | Allow drops into another group (grouped values are rewritten). Default false. |
| `orderField` | `readonly orderField?: string;` | optional | Field holding a persisted order; drops write new values to it. |
| `handoff` | `readonly handoff?: RowDragHandoff;` | optional | Registry shared by the grids that exchange rows. Default: one registry shared by every `DataGrid` of the page. |

### DataGridRowDragEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRowDragEvent

```ts
interface DataGridRowDragEvent<Row> extends DataGridEvent {
    readonly rowIds: readonly RowId[];
    rows(): readonly Row[];
    readonly fromIndex: number;
    readonly toIndex: number;
    readonly targetRowId: RowId | null;
    readonly position: 'before' | 'after' | 'into' | null;
    readonly parentId?: RowId | null;
    readonly valid: boolean;
    readonly reason: string | null;
    readonly targetGridId: string | null;
    readonly target: Element | null;
}
```

Row drag events (`onRowDragStart`, `onRowDrag`, `onBeforeRowDrop`, `onRowDrop`).

Members (15):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowIds` | `readonly rowIds: readonly RowId[];` |  |  |
| `rows` | `rows(): readonly Row[];` |  | The dragged rows (raw references). |
| `fromIndex` | `readonly fromIndex: number;` |  | Data row index of the first dragged row (-1 for rows from another grid). |
| `toIndex` | `readonly toIndex: number;` |  | Data row index the first row occupies after the drop; -1 without a valid target. |
| `targetRowId` | `readonly targetRowId: RowId \| null;` |  | Target row and side; null outside the grid rows. |
| `position` | `readonly position: 'before' \| 'after' \| 'into' \| null;` |  |  |
| `parentId` | `readonly parentId?: RowId \| null;` | optional | Tree mode: the parent the rows join (`into`: the target row; null: the roots); undefined outside tree mode. |
| `valid` | `readonly valid: boolean;` |  |  |
| `reason` | `readonly reason: string \| null;` |  | Why the target is invalid (`self`, `sorted`, `groupChange`, ...), or null. |
| `targetGridId` | `readonly targetGridId: string \| null;` |  | The grid the rows drop into: this grid's id, another grid's id, or null (custom target or nowhere). |
| `target` | `readonly target: Element \| null;` |  | Element under the pointer (pointer drags); null for keyboard and API moves. |
| `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). |

### DataGridRowDragPreviewContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRowDragPreviewContext

```ts
interface DataGridRowDragPreviewContext<Row> {
    readonly rowIds: readonly RowId[];
    readonly rows: readonly Row[];
}
```

Context of `renderRowDragPreview`.

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowIds` | `readonly rowIds: readonly RowId[];` |  |  |
| `rows` | `readonly rows: readonly Row[];` |  |  |

### DataGridRowElementProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRowElementProps

```ts
interface DataGridRowElementProps {
    role: 'row';
    'aria-rowindex': number;
    className: string;
    style?: CSSProperties;
    'data-row-id': RowId;
    'data-row-index': number;
    'aria-selected'?: boolean;
    'data-expanded'?: 'true' | 'false';
    'aria-level'?: number;
    'aria-posinset'?: number;
    'aria-setsize'?: number;
    'aria-expanded'?: boolean;
    'aria-busy'?: boolean;
    'data-alt'?: '';
    ref?: Ref<HTMLDivElement>;
    [key: `data-${string}`]: string | number | boolean | undefined;
}
```

Props a custom row must spread onto its `role="row"` element.

Members (15):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `role` | `role: 'row';` |  |  |
| `aria-rowindex` | `'aria-rowindex': number;` |  |  |
| `className` | `className: string;` |  |  |
| `style` | `style?: CSSProperties;` | optional |  |
| `data-row-id` | `'data-row-id': RowId;` |  |  |
| `data-row-index` | `'data-row-index': number;` |  |  |
| `aria-selected` | `'aria-selected'?: boolean;` | optional |  |
| `data-expanded` | `'data-expanded'?: 'true' \| 'false';` | optional | Rows with a detail row or child grid: `'true'` / `'false'`. Not `aria-expanded`, which ARIA allows on `treegrid` rows only; the detail toggle button carries `aria-expanded`. |
| `aria-level` | `'aria-level'?: number;` | optional | Tree mode (`role="treegrid"` only): depth + 1, sibling ordinal and count, parents' expansion, loading children. |
| `aria-posinset` | `'aria-posinset'?: number;` | optional |  |
| `aria-setsize` | `'aria-setsize'?: number;` | optional |  |
| `aria-expanded` | `'aria-expanded'?: boolean;` | optional |  |
| `aria-busy` | `'aria-busy'?: boolean;` | optional |  |
| `data-alt` | `'data-alt'?: '';` | optional |  |
| `ref` | `ref?: Ref<HTMLDivElement>;` | optional |  |

### DataGridRowInfo

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRowInfo

```ts
interface DataGridRowInfo<Row> {
    readonly rowId: RowId;
    readonly row: Row | null;
    readonly rowIndex: number;
    readonly field: string | null;
    readonly column: DataGridColumnInfo<Row> | null;
    readonly element: HTMLElement | null;
    readonly cellElement: HTMLElement | null;
}
```

Row and optional cell resolved from a row id or a DOM element.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row \| null;` |  |  |
| `rowIndex` | `readonly rowIndex: number;` |  | Position in the visible row model; -1 when the row is filtered out. |
| `field` | `readonly field: string \| null;` |  | Column of the cell the element is in; null for a row id or a row-level element. |
| `column` | `readonly column: DataGridColumnInfo<Row> \| null;` |  |  |
| `element` | `readonly element: HTMLElement \| null;` |  | The row element; null outside the rendered window. |
| `cellElement` | `readonly cellElement: HTMLElement \| null;` |  |  |

### DataGridRowProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridRowProps

```ts
interface DataGridRowProps extends Omit<DataGridRowElementProps, 'role' | 'aria-rowindex' | 'className' | 'data-row-id' | 'data-row-index'> {
    'aria-rowindex': number;
    'data-row-id': RowId;
    'data-row-index'?: number;
    className?: string;
    children?: ReactNode;
}
```

Members (13):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `aria-rowindex` | `'aria-rowindex': number;` |  |  |
| `data-row-id` | `'data-row-id': RowId;` |  |  |
| `data-row-index` | `'data-row-index'?: number;` | optional |  |
| `className` | `className?: string;` | optional |  |
| `children` | `children?: ReactNode;` | optional |  |
| `style` | `style?: CSSProperties;` | optional, inherited |  |
| `aria-selected` | `aria-selected?: boolean;` | optional, inherited |  |
| `aria-level` | `aria-level?: number;` | optional, inherited | Tree mode (`role="treegrid"` only): depth + 1, sibling ordinal and count, parents' expansion, loading children. |
| `aria-posinset` | `aria-posinset?: number;` | optional, inherited |  |
| `aria-setsize` | `aria-setsize?: number;` | optional, inherited |  |
| `aria-expanded` | `aria-expanded?: boolean;` | optional, inherited |  |
| `aria-busy` | `aria-busy?: boolean;` | optional, inherited |  |
| `ref` | `ref?: Ref<HTMLDivElement>;` | optional, inherited |  |

### DataGridSaveEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSaveEvent

```ts
interface DataGridSaveEvent<Row> extends DataGridEvent {
    readonly mode: EditMode;
    readonly added: readonly RowId[];
    readonly changed: readonly {
        readonly rowId: RowId;
        readonly fields: readonly string[];
    }[];
    readonly deleted: readonly RowId[];
    rows(): EditBatchChanges<Row>;
    readonly status: DataGridSaveStatus;
    readonly result: WriteResult<Row> | null;
    readonly error: Error | null;
    readonly failedRowIds: readonly RowId[];
}
```

`onBeforeSave` (before the write is sent; cancellable) / `onSave` (after
the write settled). Lists are computed on first read.

Members (13):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `mode` | `readonly mode: EditMode;` |  |  |
| `added` | `readonly added: readonly RowId[];` |  |  |
| `changed` | `readonly changed: readonly {     readonly rowId: RowId;     readonly fields: readonly string[]; }[];` |  |  |
| `deleted` | `readonly deleted: readonly RowId[];` |  |  |
| `rows` | `rows(): EditBatchChanges<Row>;` |  | The rows with drafts applied (before-event); the rows written, with the source's echo where it sent one (after-event). |
| `status` | `readonly status: DataGridSaveStatus;` |  | `pending` before the write; `applied`, `partial` (some rows failed), `rejected`, or `error` (the write threw) after. |
| `result` | `readonly result: WriteResult<Row> \| null;` |  | The data source's write result (after-event), else null. |
| `error` | `readonly error: Error \| null;` |  | The error a failed write threw (status `error`), else null. |
| `failedRowIds` | `readonly failedRowIds: readonly RowId[];` |  | Rows the write did not apply (row or cell errors, conflicts, rejection); they keep their drafts. |
| `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). |

### DataGridScrollOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridScrollOptions

```ts
interface DataGridScrollOptions {
    align?: 'start' | 'center' | 'end' | 'nearest';
}
```

Members (1):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `align` | `align?: 'start' \| 'center' \| 'end' \| 'nearest';` | optional |  |

### DataGridScrollToOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridScrollToOptions

```ts
interface DataGridScrollToOptions {
    top?: number;
    left?: number;
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `top` | `top?: number;` | optional | Offset from the first body row in px (row offsets as `scrollToRow` uses them; scroll compression is handled). |
| `left` | `left?: number;` | optional | Offset from the inline start of the center (unpinned) columns in px; positive in RTL too. |

### DataGridSearch

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSearch

```ts
interface DataGridSearch {
    text?: string;
    fields?: readonly string[];
    operator?: 'contains' | 'startsWith' | 'endsWith' | 'equal' | 'notEqual' | 'wildcard' | 'like';
    matchCase?: boolean;
    ignoreAccents?: boolean;
    highlight?: boolean;
}
```

`search` prop.

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `text` | `text?: string;` | optional |  |
| `fields` | `fields?: readonly string[];` | optional | Columns searched. Default: every searchable non-date column. |
| `operator` | `operator?: 'contains' \| 'startsWith' \| 'endsWith' \| 'equal' \| 'notEqual' \| 'wildcard' \| 'like';` | optional | Default `contains`. `wildcard` (`*` any sequence, `?` one character) and `like` (`%` any sequence) match the whole value. |
| `matchCase` | `matchCase?: boolean;` | optional | Default false. |
| `ignoreAccents` | `ignoreAccents?: boolean;` | optional | Default false. |
| `highlight` | `highlight?: boolean;` | optional | Wraps the matches of the applied search in `<mark class="salmon-data-grid-search-mark">` in the displayed text of rendered cells of the searched columns (not in `renderCell` templates). Default false; no cost while off. |

### DataGridSearchBoxProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSearchBoxProps

```ts
interface DataGridSearchBoxProps<Row = unknown> {
    api?: DataGridApi<Row> | null;
    debounce?: number;
    placeholder?: string;
    'aria-label'?: string;
    className?: string;
    style?: CSSProperties;
    tabIndex?: number;
    disabled?: boolean;
    title?: string | undefined;
    onBeforeSearch?: (event: DataGridSearchBoxSearchEvent) => void;
    onFocus?: () => void;
    dataAttributes?: Readonly<Record<string, string | number | undefined>>;
    hidden?: boolean | undefined;
}
```

Members (13):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `api` | `api?: DataGridApi<Row> \| null;` | optional | The grid to search when rendered outside its subtree. |
| `debounce` | `debounce?: number;` | optional | Delay before typed text applies, in ms. Default 0 (Enter always applies at once). |
| `placeholder` | `placeholder?: string;` | optional |  |
| `aria-label` | `'aria-label'?: string;` | optional | Accessible name of the search landmark. Default `localeText.searchLabel`. |
| `className` | `className?: string;` | optional |  |
| `style` | `style?: CSSProperties;` | optional |  |
| `tabIndex` | `tabIndex?: number;` | optional | Roving tab index from a host (the toolbar). |
| `disabled` | `disabled?: boolean;` | optional |  |
| `title` | `title?: string \| undefined;` | optional |  |
| `onBeforeSearch` | `onBeforeSearch?: (event: DataGridSearchBoxSearchEvent) => void;` | optional | Called before each search is applied; `event.preventDefault()` skips it (like grid before-events). |
| `onFocus` | `onFocus?: () => void;` | optional |  |
| `dataAttributes` | `dataAttributes?: Readonly<Record<string, string \| number \| undefined>>;` | optional | Extra attributes on the landmark (toolbar item hooks). |
| `hidden` | `hidden?: boolean \| undefined;` | optional |  |

### DataGridSearchBoxSearchEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSearchBoxSearchEvent

```ts
interface DataGridSearchBoxSearchEvent extends DataGridEvent {
    readonly text: string;
}
```

`DataGridSearchBox` `onBeforeSearch` (`type: 'beforeSearch'`); `preventDefault()` skips the search.

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `text` | `readonly text: string;` |  |  |
| `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). |

### DataGridSearchChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSearchChangeEvent

```ts
interface DataGridSearchChangeEvent extends DataGridEvent {
    readonly text: string;
    readonly previousText: string;
}
```

`onBeforeSearchChange` (`type: 'beforeSearchChange'`) and `onSearchChange` (`'searchChange'`).

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `text` | `readonly text: string;` |  | Proposed (before) or applied (after) text. |
| `previousText` | `readonly previousText: string;` |  |  |
| `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). |

### DataGridSelection

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSelection

```ts
interface DataGridSelection {
    readonly multiple?: boolean;
    readonly mode?: 'row' | 'cell' | 'both';
    readonly cellRange?: 'flow' | 'box' | 'boxWithBorder';
    readonly checkboxRowClick?: 'add' | 'replace';
    readonly checkboxOnly?: boolean;
    readonly toggle?: boolean;
    readonly persistent?: boolean;
    readonly additive?: boolean;
    readonly columns?: boolean;
    readonly rowIds?: readonly RowId[];
}
```

`selection` prop. Selection is on by default (single row).

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `multiple` | `readonly multiple?: boolean;` | optional | Several rows (or cells). Default false (single). |
| `mode` | `readonly mode?: 'row' \| 'cell' \| 'both';` | optional | Default `row`. |
| `cellRange` | `readonly cellRange?: 'flow' \| 'box' \| 'boxWithBorder';` | optional | Cell range shape. Default `flow`. |
| `checkboxRowClick` | `readonly checkboxRowClick?: 'add' \| 'replace';` | optional | With a `type: 'selection'` column: `add` (default) toggles the clicked row; `replace` selects only it. |
| `checkboxOnly` | `readonly checkboxOnly?: boolean;` | optional | Only the selection column's checkbox selects rows. |
| `toggle` | `readonly toggle?: boolean;` | optional | Clicking the only selected row deselects it. Default true. |
| `persistent` | `readonly persistent?: boolean;` | optional | Keep selection across sort, filter, search, page, and group changes. Default false. |
| `additive` | `readonly additive?: boolean;` | optional | Plain clicks add to the selection (no modifier keys) in multiple mode. |
| `columns` | `readonly columns?: boolean;` | optional | Column selection. |
| `rowIds` | `readonly rowIds?: readonly RowId[];` | optional | Selected row ids. Reactive: a changed value re-applies. |

### DataGridSelectionApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSelectionApi

```ts
interface DataGridSelectionApi<Row> {
    selectRows(rowIds: RowId | readonly RowId[], options?: {
        mode?: 'replace' | 'add' | 'remove' | 'toggle';
    }): DataGridActionResult;
    selectRowRange(fromRowId: RowId, toRowId: RowId, options?: {
        mode?: 'replace' | 'add';
    }): DataGridActionResult;
    selectAll(options?: {
        scope?: 'page' | 'filtered';
    }): DataGridActionResult;
    clearSelection(parts?: {
        rows?: boolean;
        cells?: boolean;
        columns?: boolean;
    }): DataGridActionResult;
    selectCells(cells: readonly DataGridCellKey[], options?: {
        mode?: 'replace' | 'add' | 'toggle';
    }): DataGridActionResult;
    selectCellRange(anchor: DataGridCellKey, focus: DataGridCellKey, options?: {
        mode?: 'replace' | 'add';
    }): DataGridActionResult;
    selectColumns(fields: string | readonly string[], options?: {
        mode?: 'replace' | 'add' | 'toggle';
    }): DataGridActionResult;
    isRowSelected(rowId: RowId): boolean;
    getSelectedRowIds(): readonly RowId[];
    getSelectedRows(): readonly Row[];
    getSelectedCells(): readonly DataGridCellKey[];
    getSelectedColumns(): readonly string[];
    getSelection(): SerializedSelection | undefined;
    setSelection(selection: SerializedSelection): DataGridActionResult;
    getSelectionSummary(): SelectionSummary | undefined;
}
```

Row and cell selection methods (ids and fields).

Members (15):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `selectRows` | `selectRows(rowIds: RowId \| readonly RowId[], options?: {     mode?: 'replace' \| 'add' \| 'remove' \| 'toggle'; }): DataGridActionResult;` |  |  |
| `selectRowRange` | `selectRowRange(fromRowId: RowId, toRowId: RowId, options?: {     mode?: 'replace' \| 'add'; }): DataGridActionResult;` |  |  |
| `selectAll` | `selectAll(options?: {     scope?: 'page' \| 'filtered'; }): DataGridActionResult;` |  | `page`: every row of the current page (all rows without paging). `filtered` (default with paging off): every row matching the query, O(1). |
| `clearSelection` | `clearSelection(parts?: {     rows?: boolean;     cells?: boolean;     columns?: boolean; }): DataGridActionResult;` |  |  |
| `selectCells` | `selectCells(cells: readonly DataGridCellKey[], options?: {     mode?: 'replace' \| 'add' \| 'toggle'; }): DataGridActionResult;` |  |  |
| `selectCellRange` | `selectCellRange(anchor: DataGridCellKey, focus: DataGridCellKey, options?: {     mode?: 'replace' \| 'add'; }): DataGridActionResult;` |  |  |
| `selectColumns` | `selectColumns(fields: string \| readonly string[], options?: {     mode?: 'replace' \| 'add' \| 'toggle'; }): DataGridActionResult;` |  |  |
| `isRowSelected` | `isRowSelected(rowId: RowId): boolean;` |  |  |
| `getSelectedRowIds` | `getSelectedRowIds(): readonly RowId[];` |  |  |
| `getSelectedRows` | `getSelectedRows(): readonly Row[];` |  | Raw rows, in the order of `getSelectedRowIds()`. |
| `getSelectedCells` | `getSelectedCells(): readonly DataGridCellKey[];` |  |  |
| `getSelectedColumns` | `getSelectedColumns(): readonly string[];` |  |  |
| `getSelection` | `getSelection(): SerializedSelection \| undefined;` |  | Serializable selection (scope, ids or excluded ids, cell ranges, columns). |
| `setSelection` | `setSelection(selection: SerializedSelection): DataGridActionResult;` |  |  |
| `getSelectionSummary` | `getSelectionSummary(): SelectionSummary \| undefined;` |  |  |

### DataGridSelectionChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSelectionChangeEvent

```ts
interface DataGridSelectionChangeEvent<Row> extends DataGridEvent {
    readonly rowIds: readonly RowId[];
    readonly added: readonly RowId[];
    readonly removed: readonly RowId[];
    rows(): readonly Row[];
    readonly cells: readonly DataGridCellKey[];
    readonly addedCells: readonly DataGridCellKey[];
    readonly removedCells: readonly DataGridCellKey[];
    readonly columns: readonly string[];
    readonly addedColumns: readonly string[];
    readonly removedColumns: readonly string[];
    readonly scope: 'explicit' | 'allFiltered';
    readonly excludedRowIds: readonly RowId[];
    readonly ctrlKey: boolean;
    readonly shiftKey: boolean;
    readonly target: 'row' | 'cell' | 'column' | 'checkbox' | null;
}
```

`onBeforeSelectionChange` / `onSelectionChange`: one event per selection command, for row, cell and column
selection, selecting and deselecting alike. Every selection field is the selection after the change (proposed
in the before-event, applied in the after-event); `target` names the part the command selects. Large fields
are computed on first read; read them synchronously. Built only while a handler is bound.

Members (19):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowIds` | `readonly rowIds: readonly RowId[];` |  | Selected row ids after the change. |
| `added` | `readonly added: readonly RowId[];` |  | Rows that become selected / deselected. |
| `removed` | `readonly removed: readonly RowId[];` |  |  |
| `rows` | `rows(): readonly Row[];` |  | Selected rows (raw references), in `rowIds` order. |
| `cells` | `readonly cells: readonly DataGridCellKey[];` |  | Selected cells after the change: the anchor and focus cell of each range, like `api.getSelectedCells()`. |
| `addedCells` | `readonly addedCells: readonly DataGridCellKey[];` |  | Cells that become selected / deselected (every cell of the changed ranges; O(cells in the ranges)). |
| `removedCells` | `readonly removedCells: readonly DataGridCellKey[];` |  |  |
| `columns` | `readonly columns: readonly string[];` |  | Selected column fields after the change. |
| `addedColumns` | `readonly addedColumns: readonly string[];` |  | Columns that become selected / deselected. |
| `removedColumns` | `readonly removedColumns: readonly string[];` |  |  |
| `scope` | `readonly scope: 'explicit' \| 'allFiltered';` |  | `allFiltered` after a select-all across pages: `excludedRowIds` lists the exceptions. |
| `excludedRowIds` | `readonly excludedRowIds: readonly RowId[];` |  |  |
| `ctrlKey` | `readonly ctrlKey: boolean;` |  |  |
| `shiftKey` | `readonly shiftKey: boolean;` |  |  |
| `target` | `readonly target: 'row' \| 'cell' \| 'column' \| 'checkbox' \| null;` |  |  |
| `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). |

### DataGridSortChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSortChangeEvent

```ts
interface DataGridSortChangeEvent extends DataGridEvent {
    readonly sortBy: readonly DataGridSortItem[];
    readonly previousSortBy: readonly DataGridSortItem[];
    readonly field: string | null;
}
```

`onBeforeSortChange` (`type: 'beforeSortChange'`) and `onSortChange` (`'sortChange'`).

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `sortBy` | `readonly sortBy: readonly DataGridSortItem[];` |  | Proposed (before) or applied (after) sort. |
| `previousSortBy` | `readonly previousSortBy: readonly DataGridSortItem[];` |  |  |
| `field` | `readonly field: string \| null;` |  | Column that triggered the change, if any. |
| `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). |

### DataGridSortItem

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSortItem

```ts
interface DataGridSortItem {
    field: string;
    direction: DataGridSortDirection;
}
```

One sorted column.

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `field: string;` |  |  |
| `direction` | `direction: DataGridSortDirection;` |  |  |

### DataGridSorting

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSorting

```ts
interface DataGridSorting {
    multiple?: boolean;
    order?: readonly (DataGridSortDirection | null)[];
    sortBy?: readonly DataGridSortItem[];
    indicators?: 'sorted' | 'always';
}
```

`sorting` prop.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `multiple` | `multiple?: boolean;` | optional | Ctrl/Cmd+click and Ctrl/Cmd+Enter add columns to the sort. Default false. |
| `order` | `order?: readonly (DataGridSortDirection \| null)[];` | optional | Header click cycle. Default `['asc', 'desc', null]`; `['asc', 'desc']` never unsorts. |
| `sortBy` | `sortBy?: readonly DataGridSortItem[];` | optional | Sorted columns, in priority order. |
| `indicators` | `indicators?: 'sorted' \| 'always';` | optional | `'sorted'` (default): only a sorted header shows its direction arrow. `'always'`: every sortable header shows an up and down arrow pair, the active direction highlighted. |

### DataGridSpanColumn

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSpanColumn

```ts
interface DataGridSpanColumn<Row> {
    readonly colSpan?: DataGridSpan<Row>;
    readonly rowSpan?: DataGridSpan<Row>;
}
```

Span fields of a column.

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `colSpan` | `readonly colSpan?: DataGridSpan<Row>;` | optional | Covers following visible columns of the same pin zone (clamped at a pin edge). |
| `rowSpan` | `readonly rowSpan?: DataGridSpan<Row>;` | optional | Covers following rows, also under row virtualization; in tree mode a span ends at a parent boundary. |

### DataGridSpanContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSpanContext

```ts
interface DataGridSpanContext<Row> {
    readonly row: Row;
    readonly rowId: RowId;
    readonly rowIndex: number;
    readonly column: DataGridColumnInfo<Row>;
    readonly field: string;
    readonly value: unknown;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `row` | `readonly row: Row;` |  |  |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `rowIndex` | `readonly rowIndex: number;` |  |  |
| `column` | `readonly column: DataGridColumnInfo<Row>;` |  |  |
| `field` | `readonly field: string;` |  | Column id of the cell. |
| `value` | `readonly value: unknown;` |  |  |

### DataGridToolbarContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridToolbarContext

```ts
interface DataGridToolbarContext<Row = unknown> {
    readonly items: readonly DataGridToolbarItem[];
    readonly defaultToolbar: ReactNode;
    readonly api: DataGridApi<Row>;
}
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `items` | `readonly items: readonly DataGridToolbarItem[];` |  |  |
| `defaultToolbar` | `readonly defaultToolbar: ReactNode;` |  |  |
| `api` | `readonly api: DataGridApi<Row>;` |  |  |

### DataGridToolbarItem

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridToolbarItem

```ts
interface DataGridToolbarItem {
    readonly id: string;
    readonly label?: string;
    readonly icon?: ReactNode;
    readonly title?: string;
    readonly align?: 'start' | 'center' | 'end';
    readonly disabled?: boolean;
    readonly render?: (ctx: {
        readonly disabled: boolean;
    }) => ReactNode;
}
```

A toolbar item. An object whose `id` is a built-in id keeps the built-in
behavior (use it to change the label, icon, or alignment of a built-in).
`disabled` is reactive.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id: string;` |  |  |
| `label` | `readonly label?: string;` | optional | Button text; for a `render` item its accessible name and overflow menu text (development builds warn when a `render` item has neither `label` nor `title`). |
| `icon` | `readonly icon?: ReactNode;` | optional |  |
| `title` | `readonly title?: string;` | optional | Tooltip (`title`). |
| `align` | `readonly align?: 'start' \| 'center' \| 'end';` | optional |  |
| `disabled` | `readonly disabled?: boolean;` | optional |  |
| `render` | `readonly render?: (ctx: {     readonly disabled: boolean; }) => ReactNode;` | optional | Custom content; the item keeps its roving tab stop. |

### DataGridToolbarItemClickEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridToolbarItemClickEvent

```ts
interface DataGridToolbarItemClickEvent extends DataGridEvent {
    readonly item: DataGridToolbarItem;
}
```

`onToolbarItemClick`; `preventDefault()` skips the built-in action.

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `item` | `readonly item: DataGridToolbarItem;` |  |  |
| `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). |

### DataGridTree

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTree

```ts
interface DataGridTree<Row = unknown> {
    readonly childrenField?: string;
    readonly parentIdField?: string;
    readonly hasChildrenField?: string;
    readonly expandedField?: string;
    readonly column?: string;
    readonly defaultExpanded?: boolean | number;
    readonly expandedRows?: Readonly<Record<RowId, boolean>>;
    readonly filterMode?: DataGridTreeFilterMode;
    readonly pageBy?: 'all' | 'root';
    readonly checkbox?: boolean | {
        readonly cascade?: boolean | 'filtered';
    };
    readonly copyMode?: DataGridTreeFilterMode;
    readonly loadChildren?: (ctx: DataGridTreeLoadContext<Row>) => readonly Row[] | Promise<readonly Row[]>;
}
```

`tree` prop (`true`: `{ childrenField: 'children' }`).

Members (12):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `childrenField` | `readonly childrenField?: string;` | optional | Nested rows: the field holding child arrays. Default `'children'` unless `parentIdField` is set. |
| `parentIdField` | `readonly parentIdField?: string;` | optional | Flat self-referential rows: the field holding the parent's row id (`parentIdMapping`); the id is `getRowId`. |
| `hasChildrenField` | `readonly hasChildrenField?: string;` | optional | Rows whose children load on demand (`hasChildMapping`). |
| `expandedField` | `readonly expandedField?: string;` | optional | Initial expansion from a boolean data field (`expandStateMapping`). |
| `column` | `readonly column?: string;` | optional | Field or column id of the tree column (`treeColumnIndex`). Default: the first visible data column; follows reorder, pinning and hiding. |
| `defaultExpanded` | `readonly defaultExpanded?: boolean \| number;` | optional | `true` (default): parents expanded; `false`: collapsed (`enableCollapseAll`); `n`: depths below `n` expanded. |
| `expandedRows` | `readonly expandedRows?: Readonly<Record<RowId, boolean>>;` | optional | *Salmon*: reactive expansion overrides over `defaultExpanded`. |
| `filterMode` | `readonly filterMode?: DataGridTreeFilterMode;` | optional | Rows a filter or search keeps (`filterSettings.hierarchyMode`). Default `'ancestors'`. |
| `pageBy` | `readonly pageBy?: 'all' \| 'root';` | optional | Paging counts every visible row (default) or root rows with their subtrees (`pageSizeMode`). |
| `checkbox` | `readonly checkbox?: boolean \| {     readonly cascade?: boolean \| 'filtered'; };` | optional | Checkbox in the tree column (column `showCheckbox`); its state is the row selection. `cascade` selects subtrees (`hierarchyCheckboxMode`). |
| `copyMode` | `readonly copyMode?: DataGridTreeFilterMode;` | optional | Rows `copy()` adds around the copied rows (`copyHierarchyMode`). Default `'ancestors'`. |
| `loadChildren` | `readonly loadChildren?: (ctx: DataGridTreeLoadContext<Row>) => readonly Row[] \| Promise<readonly Row[]>;` | optional | Loads the children of a lazy row (`hasChildrenField`) for local data; the returned rows join the data under the row. With a remote `data` source the grid reads `read({ parentRowId })` instead. |

### DataGridTreeApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeApi

```ts
interface DataGridTreeApi<Row> {
    expandAllTreeRows(): DataGridActionResult;
    collapseAllTreeRows(): DataGridActionResult;
    expandTreeLevel(depth: number): DataGridActionResult;
    collapseTreeLevel(depth: number): DataGridActionResult;
    expandTreeRows(rowIds: RowId | readonly RowId[]): DataGridActionResult;
    collapseTreeRows(rowIds: RowId | readonly RowId[]): DataGridActionResult;
    toggleTreeRow(rowId: RowId, expanded?: boolean): DataGridActionResult;
    indentRows(rowIds: RowId | readonly RowId[]): DataGridActionResult;
    outdentRows(rowIds: RowId | readonly RowId[]): DataGridActionResult;
    getTreeRow(rowId: RowId): DataGridTreeRowInfo | null;
    getChildRows(rowId: RowId | null): readonly Row[];
    reloadTreeChildren(rowId: RowId): DataGridActionResult;
    getVisibleRows(): readonly Row[];
}
```

Tree methods of `DataGridApi` (rejected or empty without `tree`).

Members (13):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `expandAllTreeRows` | `expandAllTreeRows(): DataGridActionResult;` |  |  |
| `collapseAllTreeRows` | `collapseAllTreeRows(): DataGridActionResult;` |  |  |
| `expandTreeLevel` | `expandTreeLevel(depth: number): DataGridActionResult;` |  | Expands the parents at `depth` (0: roots). |
| `collapseTreeLevel` | `collapseTreeLevel(depth: number): DataGridActionResult;` |  |  |
| `expandTreeRows` | `expandTreeRows(rowIds: RowId \| readonly RowId[]): DataGridActionResult;` |  |  |
| `collapseTreeRows` | `collapseTreeRows(rowIds: RowId \| readonly RowId[]): DataGridActionResult;` |  |  |
| `toggleTreeRow` | `toggleTreeRow(rowId: RowId, expanded?: boolean): DataGridActionResult;` |  |  |
| `indentRows` | `indentRows(rowIds: RowId \| readonly RowId[]): DataGridActionResult;` |  | Moves rows under their previous sibling. |
| `outdentRows` | `outdentRows(rowIds: RowId \| readonly RowId[]): DataGridActionResult;` |  | Moves rows after their parent, as its siblings. |
| `getTreeRow` | `getTreeRow(rowId: RowId): DataGridTreeRowInfo \| null;` |  |  |
| `getChildRows` | `getChildRows(rowId: RowId \| null): readonly Row[];` |  | Kept children of a row in view order (`null`: the roots). |
| `reloadTreeChildren` | `reloadTreeChildren(rowId: RowId): DataGridActionResult;` |  | *Salmon*: retries a failed lazy child load. |
| `getVisibleRows` | `getVisibleRows(): readonly Row[];` |  | Visible data rows in view order. |

### DataGridTreeContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeContext

```ts
interface DataGridTreeContext {
    readonly depth: number;
    readonly hasChildren: boolean;
    readonly expanded: boolean;
    readonly loadStatus: DataGridTreeLoadStatus;
}
```

`ctx.tree` of `column.renderCell`, `getRowProps` and row templates in tree mode.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `depth` | `readonly depth: number;` |  | 0 for root rows. |
| `hasChildren` | `readonly hasChildren: boolean;` |  |  |
| `expanded` | `readonly expanded: boolean;` |  |  |
| `loadStatus` | `readonly loadStatus: DataGridTreeLoadStatus;` |  |  |

### DataGridTreeLoadContext

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeLoadContext

```ts
interface DataGridTreeLoadContext<Row> {
    readonly rowId: RowId;
    readonly row: Row;
    readonly signal: AbortSignal;
}
```

Load context of `tree.loadChildren`.

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row;` |  |  |
| `signal` | `readonly signal: AbortSignal;` |  |  |

### DataGridTreeProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeProps

```ts
interface DataGridTreeProps<Row> {
    tree?: boolean | DataGridTree<Row>;
    onBeforeTreeToggle?: (event: DataGridTreeToggleEvent<Row>) => void;
    onTreeToggle?: (event: DataGridTreeToggleEvent<Row>) => void;
}
```

Tree props of `DataGridProps`.

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `tree` | `tree?: boolean \| DataGridTree<Row>;` | optional | Tree mode: rows with children, indented in the tree column. Read at creation (its options are reactive). |
| `onBeforeTreeToggle` | `onBeforeTreeToggle?: (event: DataGridTreeToggleEvent<Row>) => void;` | optional |  |
| `onTreeToggle` | `onTreeToggle?: (event: DataGridTreeToggleEvent<Row>) => void;` | optional |  |

### DataGridTreeRowInfo

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeRowInfo

```ts
interface DataGridTreeRowInfo {
    readonly rowId: RowId;
    readonly depth: number;
    readonly parentId: RowId | null;
    readonly hasChildren: boolean;
    readonly childCount: number;
    readonly expanded: boolean;
    readonly loadStatus: DataGridTreeLoadStatus;
    readonly posinset: number;
    readonly setsize: number;
    readonly context: boolean;
    readonly visible: boolean;
}
```

Row info of `api.getTreeRow(rowId)`.

Members (11):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `depth` | `readonly depth: number;` |  |  |
| `parentId` | `readonly parentId: RowId \| null;` |  |  |
| `hasChildren` | `readonly hasChildren: boolean;` |  |  |
| `childCount` | `readonly childCount: number;` |  |  |
| `expanded` | `readonly expanded: boolean;` |  |  |
| `loadStatus` | `readonly loadStatus: DataGridTreeLoadStatus;` |  |  |
| `posinset` | `readonly posinset: number;` |  | 1-based ordinal and count among the kept siblings (`aria-posinset` / `aria-setsize`). |
| `setsize` | `readonly setsize: number;` |  |  |
| `context` | `readonly context: boolean;` |  | Kept only as an ancestor or descendant of a filter match. |
| `visible` | `readonly visible: boolean;` |  |  |

### DataGridTreeToggleEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeToggleEvent

```ts
interface DataGridTreeToggleEvent<Row> extends DataGridEvent {
    readonly rowId: RowId;
    readonly row: Row | null;
    readonly expanded: boolean;
    readonly depth: number;
    readonly lazy: boolean;
}
```

`onBeforeTreeToggle` (cancel with `preventDefault()`) / `onTreeToggle`.

Members (9):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `row` | `readonly row: Row \| null;` |  |  |
| `expanded` | `readonly expanded: boolean;` |  | The new state. |
| `depth` | `readonly depth: number;` |  |  |
| `lazy` | `readonly lazy: boolean;` |  | The row loads its children on demand. |
| `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). |

### DataGridTreeToggleProps

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeToggleProps

```ts
interface DataGridTreeToggleProps {
    readonly rowId: RowId;
    readonly label?: string;
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowId` | `readonly rowId: RowId;` |  |  |
| `label` | `readonly label?: string;` | optional | The row's name in the button label (`Expand {row}`). Default: the tree column's text. |

### DataGridViewApi

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridViewApi

```ts
interface DataGridViewApi {
    getViewport(): DataGridViewport;
    subscribeViewport(listener: () => void): () => void;
    getRowOffsets(): RowMetrics;
    scrollTo(options: DataGridScrollToOptions): void;
    getPageSizeForHeight(height: number): number;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `getViewport` | `getViewport(): DataGridViewport;` |  | Scroll sync extension point: the current body viewport. |
| `subscribeViewport` | `subscribeViewport(listener: () => void): () => void;` |  | Calls `listener` outside React on every body scroll and layout change; returns the unsubscribe function. |
| `getRowOffsets` | `getRowOffsets(): RowMetrics;` |  | Row height extension point: the row offsets of the visible row model (the body's own prefix sums). |
| `scrollTo` | `scrollTo(options: DataGridScrollToOptions): void;` |  | Scrolls the body to an offset. An omitted axis keeps its position; offsets are clamped to the scroll range. |
| `getPageSizeForHeight` | `getPageSizeForHeight(height: number): number;` |  | Whole data rows that fit in `height` px after the toolbar, group drop area, header rows, footer aggregate rows and pager; 0 when none fit. Rows count `rowHeight` (the estimate with measured rows, the card height in adaptive vertical mode). Before mount only the header and footer rows are subtracted. |

### DataGridViewChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridViewChangeEvent

```ts
interface DataGridViewChangeEvent extends DataGridEvent {
    readonly rowCount: number;
    readonly totalRowCount: number;
    readonly reason: DataGridViewChangeReason;
}
```

`onViewChange` (`type: 'viewChange'`): fires once
per committed change of the displayed rows (data, sort, filter, search,
group, page), after the commit that rendered it. Never on scroll, focus,
selection, or group / detail expansion. Not cancellable.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rowCount` | `readonly rowCount: number;` |  | Data rows in the view (the current page; captions and footers not counted). |
| `totalRowCount` | `readonly totalRowCount: number;` |  | Rows matching the query across every page. |
| `reason` | `readonly reason: DataGridViewChangeReason;` |  |  |
| `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). |

### DataGridViewport

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridViewport

```ts
interface DataGridViewport {
    readonly top: number;
    readonly left: number;
    readonly width: number;
    readonly height: number;
    readonly rows: VirtualRange;
}
```

`api.getViewport()`: body scroll offsets in virtual px, body extent and rendered rows.

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `top` | `readonly top: number;` |  |  |
| `left` | `readonly left: number;` |  | Positive in RTL too. |
| `width` | `readonly width: number;` |  |  |
| `height` | `readonly height: number;` |  | Body extent (viewport height without header and footer rows). |
| `rows` | `readonly rows: VirtualRange;` |  |  |

### DataGridVirtualization

Kind: interface

Page: https://salmonui.dev/docs/reference/data-grid/DataGridVirtualization

```ts
interface DataGridVirtualization {
    rows?: boolean;
    columns?: boolean;
    rowOverscan?: number;
    columnOverscan?: number;
    maxScrollHeight?: number;
    skeletonRows?: boolean;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rows` | `rows?: boolean;` | optional | Row virtualization. Default true. |
| `columns` | `columns?: boolean;` | optional | Column virtualization of the center (unpinned) zone. Default true. |
| `rowOverscan` | `rowOverscan?: number;` | optional | Rows rendered beyond each edge of the viewport. Default 5. |
| `columnOverscan` | `columnOverscan?: number;` | optional | Center columns rendered beyond each edge of the viewport. Default 2. |
| `maxScrollHeight` | `maxScrollHeight?: number;` | optional | Physical scroll height cap; taller content is compressed. Default 15,000,000 px. |
| `skeletonRows` | `skeletonRows?: boolean;` | optional | Shimmer skeleton rows instead of the loading text for rows that are not loaded yet (infinite scroll). Default true. |

## Types

### DataGridActionResult

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridActionResult

```ts
type DataGridActionResult = CommandResult;
```

Result of an action method (`applied`, `rejected`, or `async`).

### DataGridAdaptiveDialogKind

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAdaptiveDialogKind

```ts
type DataGridAdaptiveDialogKind = 'sort' | 'filter';
```

Dialog kinds raised through `onBeforeAdaptiveDialogOpen`.

### DataGridAdaptiveRowLayout

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAdaptiveRowLayout

```ts
type DataGridAdaptiveRowLayout = 'horizontal' | 'vertical';
```

Row layout in adaptive mode (`rowRenderingMode`).

### DataGridAdaptiveTarget

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridAdaptiveTarget

```ts
type DataGridAdaptiveTarget = 'both' | 'mobile' | 'desktop';
```

Where the adaptive layout applies (`adaptiveUIMode`).

### DataGridApiEngine

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridApiEngine

```ts
type DataGridApiEngine<Row = unknown> = DataGridEngine<Row> & {
    readonly infiniteScroll?: DataGridInfiniteScrollFacade<Row>;
};
```

`api.engine`: the engine plus the façades of optional modules registered by props.

Members (36):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `id: string;` | inherited |  |
| `getSnapshot` | `getSnapshot: () => DataGridSnapshot<Row>;` | inherited |  |
| `getServerSnapshot` | `getServerSnapshot: () => DataGridSnapshot<Row>;` | inherited |  |
| `subscribe` | `subscribe: (listener: () => void) => () => void;` | inherited |  |
| `select` | `select: <T>(selector: (snapshot: DataGridSnapshot<Row>) => T) => T;` | inherited |  |
| `subscribeSelector` | `subscribeSelector: <T>(selector: (snapshot: DataGridSnapshot<Row>) => T, listener: (value: T) => void, isEqual?: ((a: T, b: T) => boolean) \| undefined) => () => void;` | inherited |  |
| `subscribeCell` | `subscribeCell: (rowId: string, columnId: string, listener: () => void) => () => void;` | inherited |  |
| `subscribeRow` | `subscribeRow: (rowId: string, listener: () => void) => () => void;` | inherited |  |
| `subscribeHeader` | `subscribeHeader: (columnId: string, listener: () => void) => () => void;` | inherited |  |
| `subscribeModule` | `subscribeModule: (name: string, listener: () => void) => () => void;` | inherited |  |
| `getCellSnapshot` | `getCellSnapshot: (rowId: string, columnId: string) => CellSnapshot \| undefined;` | inherited |  |
| `getRowSnapshot` | `getRowSnapshot: (rowId: string) => RowSnapshot<Row> \| undefined;` | inherited |  |
| `getHeaderSnapshot` | `getHeaderSnapshot: (columnId: string) => HeaderSnapshot \| undefined;` | inherited |  |
| `getModuleState` | `getModuleState: <T = unknown>(name: string) => T \| undefined;` | inherited |  |
| `getSelector` | `getSelector: (moduleName: string, selectorName: string) => ((snapshot: DataGridSnapshot<Row>) => unknown) \| undefined;` | inherited |  |
| `getRow` | `getRow: (rowId: string) => Row \| undefined;` | inherited | Raw row by id (source rows, including rows filtered out of the view). |
| `getRowIndex` | `getRowIndex: (rowId: string) => number;` | inherited | Visible index of a row, or -1. |
| `getRowAt` | `getRowAt: (index: number) => Row \| undefined;` | inherited |  |
| `getRowIdAt` | `getRowIdAt: (index: number) => string \| undefined;` | inherited |  |
| `getCellValue` | `getCellValue: (rowId: string, columnId: string) => unknown;` | inherited |  |
| `getDataSource` | `getDataSource: () => DataSource<Row>;` | inherited |  |
| `setColumns` | `setColumns: (columns: readonly ColumnDef<Row>[]) => void;` | inherited | Recompiles only when the array identity or a definition identity changes. |
| `setLocale` | `setLocale: (next: { readonly locale?: string; readonly currency?: string; readonly timeZone?: string \| undefined; readonly direction?: "ltr" \| "rtl"; }) => boolean;` | inherited | Changes the locale, currency, time zone, or direction at runtime. A format change recompiles the column formatters once and re-runs the pipeline (collation follows the locale); a direction change updates `snapshot.direction` and the focus module. Omitted fields keep their value (`timeZone: undefined` given explicitly resets to the runtime zone). Returns false when nothing changed. |
| `dispatch` | `dispatch: (command: DataGridCommand) => CommandResult;` | inherited |  |
| `hasCommand` | `hasCommand: (type: string) => boolean;` | inherited | Whether a registered module declares the command type (UI commands probe it before dispatching). |
| `batch` | `batch: (run: () => void) => void;` | inherited |  |
| `onBeforeCommand` | `onBeforeCommand: (listener: (event: BeforeCommandEvent) => void \| string \| boolean) => () => void;` | inherited |  |
| `onCommand` | `onCommand: (listener: (event: CommandEvent) => void) => () => void;` | inherited |  |
| `getCommandLog` | `getCommandLog: () => readonly DataGridCommand[];` | inherited |  |
| `getInstrumentation` | `getInstrumentation: () => DataGridInstrumentation \| null;` | inherited |  |
| `connect` | `connect: () => () => void;` | inherited | With `deferDataSource`: subscribes to the source and issues the pending read. Returns the disconnect (unsubscribes, aborts the in-flight read, which the next `connect()` re-issues). A no-op when already connected. |
| `reload` | `reload: () => void;` | inherited | Re-reads the data source with the current query (retry after a data error). Before `connect()` the read waits for it. |
| `refresh` | `refresh: () => void;` | inherited | Refresh: drops the row and cell snapshot caches, invalidates the source cache (`DataSource.invalidate`), aborts and re-issues the current read, and keeps every module state (sort, filter, group, page, selection, expansion). Rows mutated in place render their new values. |
| `disposed` | `disposed: boolean;` | inherited |  |
| `dispose` | `dispose: () => void;` | inherited |  |
| `infiniteScroll` | `infiniteScroll?: DataGridInfiniteScrollFacade<Row>;` | optional, inherited | Present with the `infiniteScroll` prop. |

### DataGridColumnMenuItemId

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnMenuItemId

```ts
type DataGridColumnMenuItemId = 'autoSize' | 'autoSizeAll' | 'group' | 'ungroup' | 'sortAscending' | 'sortDescending' | 'clearSort' | 'columnChooser' | 'filter' | 'pinStart' | 'pinEnd' | 'unpin';
```

### DataGridColumnPin

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridColumnPin

```ts
type DataGridColumnPin = 'start' | 'end' | 'center';
```

Logical pin side: `start` is the left edge in LTR and the right edge in RTL;
`center` is the fixed zone: the column
stays where it is at scroll start while the other center columns scroll on
both sides of it.

### DataGridCommandHandler

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridCommandHandler

```ts
type DataGridCommandHandler = (payload: Readonly<Record<string, unknown>>) => boolean | void;
```

### DataGridContextMenuItemId

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridContextMenuItemId

```ts
type DataGridContextMenuItemId = 'autoSize' | 'autoSizeAll' | 'sortAscending' | 'sortDescending' | 'group' | 'ungroup' | 'edit' | 'delete' | 'save' | 'cancel' | 'copy' | 'exportPdf' | 'exportExcel' | 'exportCsv' | 'firstPage' | 'previousPage' | 'nextPage' | 'lastPage' | 'pinStart' | 'pinEnd' | 'unpin';
```

### DataGridContextMenuTarget

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridContextMenuTarget

```ts
type DataGridContextMenuTarget = {
    readonly kind: 'header';
    readonly field: string;
} | {
    readonly kind: 'cell';
    readonly rowId: RowId;
    readonly field: string;
} | {
    readonly kind: 'row';
    readonly rowId: RowId;
} | {
    readonly kind: 'groupCaption';
    readonly rowId: RowId;
} | {
    readonly kind: 'pager';
};
```

### DataGridDetailStatus

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridDetailStatus

```ts
type DataGridDetailStatus = 'idle' | 'loading' | 'ready' | 'error';
```

Async detail content state (`loadDetail`), per parent row.

### DataGridEditorType

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEditorType

```ts
type DataGridEditorType = 'text' | 'number' | 'select' | 'checkbox' | 'date' | 'datetime';
```

Built-in editors; HTML input vocabulary.

### DataGridElementProps

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridElementProps

```ts
type DataGridElementProps = {
    className?: string;
    style?: CSSProperties;
    title?: string;
} & {
    [key: `data-${string}`]: string | number | boolean | undefined;
};
```

`className`, `style`, `title`, and `data-*` attributes for a row, cell, or header cell.

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `className` | `className?: string;` | optional, inherited |  |
| `style` | `style?: CSSProperties;` | optional, inherited |  |
| `title` | `title?: string;` | optional, inherited |  |

### DataGridEventSource

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridEventSource

```ts
type DataGridEventSource = 'pointer' | 'keyboard' | 'touch' | 'api';
```

Input that caused an action.

### DataGridExportHooks

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridExportHooks

```ts
type DataGridExportHooks<Row> = Pick<ExportHandlers<Row>, 'cell' | 'headerCell' | 'aggregateCell' | 'groupCaption' | 'detail'>;
```

Export hooks (per-cell, header cell, aggregate cell, group caption, detail).

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `cell` | `cell?: ((ctx: ExportCellHookContext<Row>) => void \| ExportCellPatch \| null \| undefined);` | optional, inherited | Per data cell. Not called when unset. |
| `headerCell` | `headerCell?: ((ctx: ExportHeaderCellHookContext<Row>) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per header cell. |
| `aggregateCell` | `aggregateCell?: ((ctx: ExportAggregateCellHookContext) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per aggregate cell (grid footer, group footer, group caption). |
| `groupCaption` | `groupCaption?: ((ctx: ExportGroupCaptionHookContext) => void \| string \| null \| undefined);` | optional, inherited | Group caption text. |
| `detail` | `detail?: ((ctx: ExportDetailContext<Row>) => void \| ExportDetail \| null \| undefined);` | optional, inherited | A detail block written after a data row (text lines or a child table), or null for none. |

### DataGridFilter

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilter

```ts
type DataGridFilter = DataGridFilterCondition | DataGridFilterGroup;
```

### DataGridFilterOperator

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterOperator

```ts
type DataGridFilterOperator = 'equal' | 'notEqual' | 'startsWith' | 'endsWith' | 'contains' | 'doesNotContain' | 'doesNotStartWith' | 'doesNotEndWith' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual' | 'isNull' | 'isNotNull' | 'isEmpty' | 'isNotEmpty' | 'between' | 'in' | 'notIn' | 'like' | 'wildcard' | (string & {});
```

Built-in operators (the core also accepts the lowercase spellings); custom operator names pass through.

### DataGridFilterUi

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridFilterUi

```ts
type DataGridFilterUi = 'row' | 'menu' | 'checklist' | 'excel';
```

Filter UI of the grid or a column.

### DataGridGuardedAction

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridGuardedAction

```ts
type DataGridGuardedAction = 'sort' | 'filter' | 'search' | 'page' | 'group';
```

Query actions the unsaved-changes guard intercepts.

### DataGridIconName

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridIconName

```ts
type DataGridIconName = 'sortAscending' | 'sortDescending' | 'filter' | 'filtered' | 'columnMenu' | 'groupByColumn' | 'ungroup' | 'expanded' | 'collapsed' | 'pagerFirst' | 'pagerPrevious' | 'pagerNext' | 'pagerLast' | 'submenu' | 'check' | 'close' | 'overflow' | 'dragHandle';
```

Every icon the grid renders.

### DataGridIcons

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridIcons

```ts
type DataGridIcons = Partial<Record<DataGridIconName, ReactNode>>;
```

Icon overrides. A node replaces the built-in icon (it is rendered inside the
control, which keeps its accessible name, so make the node decorative);
`null` hides the icon; a missing key keeps the built-in.

Members (18):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `check` | `check?: ReactNode;` | optional, inherited |  |
| `close` | `close?: ReactNode;` | optional, inherited |  |
| `collapsed` | `collapsed?: ReactNode;` | optional, inherited |  |
| `columnMenu` | `columnMenu?: ReactNode;` | optional, inherited |  |
| `dragHandle` | `dragHandle?: ReactNode;` | optional, inherited |  |
| `expanded` | `expanded?: ReactNode;` | optional, inherited |  |
| `filter` | `filter?: ReactNode;` | optional, inherited |  |
| `filtered` | `filtered?: ReactNode;` | optional, inherited |  |
| `groupByColumn` | `groupByColumn?: ReactNode;` | optional, inherited |  |
| `overflow` | `overflow?: ReactNode;` | optional, inherited |  |
| `pagerFirst` | `pagerFirst?: ReactNode;` | optional, inherited |  |
| `pagerLast` | `pagerLast?: ReactNode;` | optional, inherited |  |
| `pagerNext` | `pagerNext?: ReactNode;` | optional, inherited |  |
| `pagerPrevious` | `pagerPrevious?: ReactNode;` | optional, inherited |  |
| `sortAscending` | `sortAscending?: ReactNode;` | optional, inherited |  |
| `sortDescending` | `sortDescending?: ReactNode;` | optional, inherited |  |
| `submenu` | `submenu?: ReactNode;` | optional, inherited |  |
| `ungroup` | `ungroup?: ReactNode;` | optional, inherited |  |

### DataGridInfiniteScrollFacade

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridInfiniteScrollFacade

```ts
type DataGridInfiniteScrollFacade<Row = unknown> = Omit<InfiniteScrollFacade<Row>, 'getStats' | 'isRowLoaded'> & {
    getStats(): InfiniteScrollStats | undefined;
    isRowLoaded(index: number): boolean | undefined;
};
```

`api.engine.infiniteScroll`: the `infiniteScroll` module façade.
`loadNext()` reads the block after the last loaded row, `retry()` re-reads
failed blocks, `reload()` re-reads from the start (`infiniteScroll.loadNext`
/ `retry` / `reload` through `engine.dispatch`); `getStatus()` is the load
state. Until the lazy infinite chunk is installed (right after mount on the
client), commands are rejected with `moduleLoading`, `getStats()` and
`isRowLoaded()` return undefined and `getStatus()` is the at-rest state.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `getStatus` | `getStatus: () => InfiniteScrollState;` | inherited | Load state, exact total (null while unknown) and loaded row count. |
| `ensureRange` | `ensureRange: (start: number, end: number) => void;` | inherited | Viewport sink: the renderer reports the rendered rows `[start, end)` when its row window changes (never per scroll frame). Schedules loads; does not change the slice until a load settles. |
| `loadNext` | `loadNext: (payload?: PayloadOf<InfiniteScrollLoadNextCommand> \| undefined) => CommandResult;` | inherited |  |
| `reload` | `reload: (payload?: PayloadOf<InfiniteScrollReloadCommand> \| undefined) => CommandResult;` | inherited |  |
| `retry` | `retry: (payload?: PayloadOf<InfiniteScrollRetryCommand> \| undefined) => CommandResult;` | inherited |  |
| `getStats` | `getStats: () => InfiniteScrollStats \| undefined;` | inherited |  |
| `isRowLoaded` | `isRowLoaded: (index: number) => boolean \| undefined;` | inherited |  |

### DataGridKeyContext

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridKeyContext

```ts
type DataGridKeyContext = 'body' | 'header' | 'pager' | 'groupCaption' | 'groupChip' | 'editor' | 'global';
```

### DataGridKeyHandler

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridKeyHandler

```ts
type DataGridKeyHandler = (ctx: {
    readonly nativeEvent: KeyboardEvent;
    readonly context: DataGridKeyContext;
    readonly command: string;
}) => boolean;
```

Handler for a keyboard command; return true when it handled the key (the event is then consumed).

### DataGridLines

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridLines

```ts
type DataGridLines = 'default' | 'both' | 'none' | 'horizontal' | 'vertical';
```

### DataGridLoadingPhase

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridLoadingPhase

```ts
type DataGridLoadingPhase = 'initial' | 'refresh' | 'page';
```

What the loading indicator is shown for.

### DataGridLocaleText

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridLocaleText

```ts
type DataGridLocaleText = {
    readonly [K in LocaleTextKey]?: LocaleMessage;
} & {
    readonly [key: string]: LocaleMessage | undefined;
};
```

`localeText` prop: overrides over the English catalog. Values are
`{param}` templates (`'Page {page} of {pageCount}'`) or plural forms
(`{ one: '1 row selected', other: '{count} rows selected' }`). Plain JSON:
safe to import from a server component and pass down.

Members (243):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `adaptiveApply` | `adaptiveApply?: LocaleMessage;` | optional, inherited |  |
| `adaptiveBarLabel` | `adaptiveBarLabel?: LocaleMessage;` | optional, inherited |  |
| `adaptiveClose` | `adaptiveClose?: LocaleMessage;` | optional, inherited |  |
| `adaptiveFiltered` | `adaptiveFiltered?: LocaleMessage;` | optional, inherited |  |
| `adaptiveSortAscending` | `adaptiveSortAscending?: LocaleMessage;` | optional, inherited |  |
| `adaptiveSortDescending` | `adaptiveSortDescending?: LocaleMessage;` | optional, inherited |  |
| `adaptiveSortNone` | `adaptiveSortNone?: LocaleMessage;` | optional, inherited |  |
| `add` | `add?: LocaleMessage;` | optional, inherited |  |
| `addCondition` | `addCondition?: LocaleMessage;` | optional, inherited |  |
| `addDialogTitle` | `addDialogTitle?: LocaleMessage;` | optional, inherited |  |
| `addGroup` | `addGroup?: LocaleMessage;` | optional, inherited |  |
| `allRows` | `allRows?: LocaleMessage;` | optional, inherited |  |
| `allRowsSelected` | `allRowsSelected?: LocaleMessage;` | optional, inherited |  |
| `and` | `and?: LocaleMessage;` | optional, inherited |  |
| `ascending` | `ascending?: LocaleMessage;` | optional, inherited |  |
| `autoSize` | `autoSize?: LocaleMessage;` | optional, inherited |  |
| `autoSizeAll` | `autoSizeAll?: LocaleMessage;` | optional, inherited |  |
| `average` | `average?: LocaleMessage;` | optional, inherited |  |
| `blank` | `blank?: LocaleMessage;` | optional, inherited |  |
| `blankGroup` | `blankGroup?: LocaleMessage;` | optional, inherited |  |
| `cancel` | `cancel?: LocaleMessage;` | optional, inherited |  |
| `cellChanged` | `cellChanged?: LocaleMessage;` | optional, inherited |  |
| `cellInvalid` | `cellInvalid?: LocaleMessage;` | optional, inherited |  |
| `childGridLabel` | `childGridLabel?: LocaleMessage;` | optional, inherited |  |
| `chooseColumns` | `chooseColumns?: LocaleMessage;` | optional, inherited |  |
| `chooseDate` | `chooseDate?: LocaleMessage;` | optional, inherited |  |
| `clear` | `clear?: LocaleMessage;` | optional, inherited |  |
| `clearSearch` | `clearSearch?: LocaleMessage;` | optional, inherited |  |
| `clearSort` | `clearSort?: LocaleMessage;` | optional, inherited |  |
| `clipboardCopyHint` | `clipboardCopyHint?: LocaleMessage;` | optional, inherited |  |
| `clipboardPasteHint` | `clipboardPasteHint?: LocaleMessage;` | optional, inherited |  |
| `clipboardText` | `clipboardText?: LocaleMessage;` | optional, inherited |  |
| `closeDialog` | `closeDialog?: LocaleMessage;` | optional, inherited |  |
| `collapse` | `collapse?: LocaleMessage;` | optional, inherited |  |
| `collapseAll` | `collapseAll?: LocaleMessage;` | optional, inherited |  |
| `collapseDetail` | `collapseDetail?: LocaleMessage;` | optional, inherited |  |
| `collapseGroup` | `collapseGroup?: LocaleMessage;` | optional, inherited |  |
| `columnChooser` | `columnChooser?: LocaleMessage;` | optional, inherited |  |
| `columnMenuButton` | `columnMenuButton?: LocaleMessage;` | optional, inherited |  |
| `columnMenuLabel` | `columnMenuLabel?: LocaleMessage;` | optional, inherited |  |
| `columnPinnedCenter` | `columnPinnedCenter?: LocaleMessage;` | optional, inherited |  |
| `columnPinnedEnd` | `columnPinnedEnd?: LocaleMessage;` | optional, inherited |  |
| `columnPinnedStart` | `columnPinnedStart?: LocaleMessage;` | optional, inherited |  |
| `columnResizer` | `columnResizer?: LocaleMessage;` | optional, inherited |  |
| `columnUnpinned` | `columnUnpinned?: LocaleMessage;` | optional, inherited |  |
| `columnsShown` | `columnsShown?: LocaleMessage;` | optional, inherited |  |
| `confirmDelete` | `confirmDelete?: LocaleMessage;` | optional, inherited |  |
| `confirmDiscard` | `confirmDiscard?: LocaleMessage;` | optional, inherited |  |
| `confirmSave` | `confirmSave?: LocaleMessage;` | optional, inherited |  |
| `confirmTitle` | `confirmTitle?: LocaleMessage;` | optional, inherited |  |
| `conflict` | `conflict?: LocaleMessage;` | optional, inherited |  |
| `contextMenuLabel` | `contextMenuLabel?: LocaleMessage;` | optional, inherited |  |
| `copy` | `copy?: LocaleMessage;` | optional, inherited |  |
| `count` | `count?: LocaleMessage;` | optional, inherited |  |
| `custom` | `custom?: LocaleMessage;` | optional, inherited |  |
| `dataError` | `dataError?: LocaleMessage;` | optional, inherited |  |
| `dataErrorTitle` | `dataErrorTitle?: LocaleMessage;` | optional, inherited |  |
| `delete` | `delete?: LocaleMessage;` | optional, inherited |  |
| `descending` | `descending?: LocaleMessage;` | optional, inherited |  |
| `detailColumnHeader` | `detailColumnHeader?: LocaleMessage;` | optional, inherited |  |
| `detailLoading` | `detailLoading?: LocaleMessage;` | optional, inherited |  |
| `edit` | `edit?: LocaleMessage;` | optional, inherited |  |
| `editCancelled` | `editCancelled?: LocaleMessage;` | optional, inherited |  |
| `editDialogTitle` | `editDialogTitle?: LocaleMessage;` | optional, inherited |  |
| `editSaved` | `editSaved?: LocaleMessage;` | optional, inherited |  |
| `editingCell` | `editingCell?: LocaleMessage;` | optional, inherited |  |
| `editingRow` | `editingRow?: LocaleMessage;` | optional, inherited |  |
| `editorLabel` | `editorLabel?: LocaleMessage;` | optional, inherited |  |
| `error` | `error?: LocaleMessage;` | optional, inherited |  |
| `expand` | `expand?: LocaleMessage;` | optional, inherited |  |
| `expandAll` | `expandAll?: LocaleMessage;` | optional, inherited |  |
| `expandDetail` | `expandDetail?: LocaleMessage;` | optional, inherited |  |
| `expandGroup` | `expandGroup?: LocaleMessage;` | optional, inherited |  |
| `export` | `export?: LocaleMessage;` | optional, inherited |  |
| `exportCsv` | `exportCsv?: LocaleMessage;` | optional, inherited |  |
| `exportExcel` | `exportExcel?: LocaleMessage;` | optional, inherited |  |
| `exportPdf` | `exportPdf?: LocaleMessage;` | optional, inherited |  |
| `exporting` | `exporting?: LocaleMessage;` | optional, inherited |  |
| `false` | `false?: LocaleMessage;` | optional, inherited |  |
| `falseCount` | `falseCount?: LocaleMessage;` | optional, inherited |  |
| `featureClipboard` | `featureClipboard?: LocaleMessage;` | optional, inherited |  |
| `featureCsvExport` | `featureCsvExport?: LocaleMessage;` | optional, inherited |  |
| `featureEditing` | `featureEditing?: LocaleMessage;` | optional, inherited |  |
| `featureExcelExport` | `featureExcelExport?: LocaleMessage;` | optional, inherited |  |
| `featureGrouping` | `featureGrouping?: LocaleMessage;` | optional, inherited |  |
| `featurePdfExport` | `featurePdfExport?: LocaleMessage;` | optional, inherited |  |
| `featurePrint` | `featurePrint?: LocaleMessage;` | optional, inherited |  |
| `featureSearch` | `featureSearch?: LocaleMessage;` | optional, inherited |  |
| `fillHandle` | `fillHandle?: LocaleMessage;` | optional, inherited |  |
| `filter` | `filter?: LocaleMessage;` | optional, inherited |  |
| `filterBarInput` | `filterBarInput?: LocaleMessage;` | optional, inherited |  |
| `filterBarOperator` | `filterBarOperator?: LocaleMessage;` | optional, inherited |  |
| `filterBuilder` | `filterBuilder?: LocaleMessage;` | optional, inherited |  |
| `filterButton` | `filterButton?: LocaleMessage;` | optional, inherited |  |
| `filterDialogTitle` | `filterDialogTitle?: LocaleMessage;` | optional, inherited |  |
| `filterField` | `filterField?: LocaleMessage;` | optional, inherited |  |
| `filterFrom` | `filterFrom?: LocaleMessage;` | optional, inherited |  |
| `filterGroup` | `filterGroup?: LocaleMessage;` | optional, inherited |  |
| `filterMenuLabel` | `filterMenuLabel?: LocaleMessage;` | optional, inherited |  |
| `filterNot` | `filterNot?: LocaleMessage;` | optional, inherited |  |
| `filterOperator` | `filterOperator?: LocaleMessage;` | optional, inherited |  |
| `filterStatus` | `filterStatus?: LocaleMessage;` | optional, inherited |  |
| `filterStatusCondition` | `filterStatusCondition?: LocaleMessage;` | optional, inherited |  |
| `filterStatusSeparator` | `filterStatusSeparator?: LocaleMessage;` | optional, inherited |  |
| `filterTo` | `filterTo?: LocaleMessage;` | optional, inherited |  |
| `filterValue` | `filterValue?: LocaleMessage;` | optional, inherited |  |
| `filtered` | `filtered?: LocaleMessage;` | optional, inherited |  |
| `firstPage` | `firstPage?: LocaleMessage;` | optional, inherited |  |
| `group` | `group?: LocaleMessage;` | optional, inherited |  |
| `groupByColumn` | `groupByColumn?: LocaleMessage;` | optional, inherited |  |
| `groupChip` | `groupChip?: LocaleMessage;` | optional, inherited |  |
| `groupChipToggle` | `groupChipToggle?: LocaleMessage;` | optional, inherited |  |
| `groupItems` | `groupItems?: LocaleMessage;` | optional, inherited |  |
| `groupLevel` | `groupLevel?: LocaleMessage;` | optional, inherited |  |
| `groupLoadFailed` | `groupLoadFailed?: LocaleMessage;` | optional, inherited |  |
| `groupLoading` | `groupLoading?: LocaleMessage;` | optional, inherited |  |
| `groupPanel` | `groupPanel?: LocaleMessage;` | optional, inherited |  |
| `groupPanelLabel` | `groupPanelLabel?: LocaleMessage;` | optional, inherited |  |
| `indent` | `indent?: LocaleMessage;` | optional, inherited |  |
| `lastPage` | `lastPage?: LocaleMessage;` | optional, inherited |  |
| `loadMore` | `loadMore?: LocaleMessage;` | optional, inherited |  |
| `loaded` | `loaded?: LocaleMessage;` | optional, inherited |  |
| `loading` | `loading?: LocaleMessage;` | optional, inherited |  |
| `lookupError` | `lookupError?: LocaleMessage;` | optional, inherited |  |
| `lookupLoading` | `lookupLoading?: LocaleMessage;` | optional, inherited |  |
| `matchCase` | `matchCase?: LocaleMessage;` | optional, inherited |  |
| `max` | `max?: LocaleMessage;` | optional, inherited |  |
| `min` | `min?: LocaleMessage;` | optional, inherited |  |
| `more` | `more?: LocaleMessage;` | optional, inherited |  |
| `multiSelect` | `multiSelect?: LocaleMessage;` | optional, inherited |  |
| `newRowErrors` | `newRowErrors?: LocaleMessage;` | optional, inherited |  |
| `newRowLabel` | `newRowLabel?: LocaleMessage;` | optional, inherited |  |
| `nextMonth` | `nextMonth?: LocaleMessage;` | optional, inherited |  |
| `nextPage` | `nextPage?: LocaleMessage;` | optional, inherited |  |
| `nextPages` | `nextPages?: LocaleMessage;` | optional, inherited |  |
| `noMatches` | `noMatches?: LocaleMessage;` | optional, inherited |  |
| `noRows` | `noRows?: LocaleMessage;` | optional, inherited |  |
| `ok` | `ok?: LocaleMessage;` | optional, inherited |  |
| `operatorBetween` | `operatorBetween?: LocaleMessage;` | optional, inherited |  |
| `operatorContains` | `operatorContains?: LocaleMessage;` | optional, inherited |  |
| `operatorDoesNotContain` | `operatorDoesNotContain?: LocaleMessage;` | optional, inherited |  |
| `operatorDoesNotEndWith` | `operatorDoesNotEndWith?: LocaleMessage;` | optional, inherited |  |
| `operatorDoesNotStartWith` | `operatorDoesNotStartWith?: LocaleMessage;` | optional, inherited |  |
| `operatorEndsWith` | `operatorEndsWith?: LocaleMessage;` | optional, inherited |  |
| `operatorEqual` | `operatorEqual?: LocaleMessage;` | optional, inherited |  |
| `operatorGreaterThan` | `operatorGreaterThan?: LocaleMessage;` | optional, inherited |  |
| `operatorGreaterThanOrEqual` | `operatorGreaterThanOrEqual?: LocaleMessage;` | optional, inherited |  |
| `operatorIn` | `operatorIn?: LocaleMessage;` | optional, inherited |  |
| `operatorIsEmpty` | `operatorIsEmpty?: LocaleMessage;` | optional, inherited |  |
| `operatorIsNotEmpty` | `operatorIsNotEmpty?: LocaleMessage;` | optional, inherited |  |
| `operatorIsNotNull` | `operatorIsNotNull?: LocaleMessage;` | optional, inherited |  |
| `operatorIsNull` | `operatorIsNull?: LocaleMessage;` | optional, inherited |  |
| `operatorLessThan` | `operatorLessThan?: LocaleMessage;` | optional, inherited |  |
| `operatorLessThanOrEqual` | `operatorLessThanOrEqual?: LocaleMessage;` | optional, inherited |  |
| `operatorLike` | `operatorLike?: LocaleMessage;` | optional, inherited |  |
| `operatorNotEqual` | `operatorNotEqual?: LocaleMessage;` | optional, inherited |  |
| `operatorNotIn` | `operatorNotIn?: LocaleMessage;` | optional, inherited |  |
| `operatorStartsWith` | `operatorStartsWith?: LocaleMessage;` | optional, inherited |  |
| `operatorWildcard` | `operatorWildcard?: LocaleMessage;` | optional, inherited |  |
| `or` | `or?: LocaleMessage;` | optional, inherited |  |
| `outdent` | `outdent?: LocaleMessage;` | optional, inherited |  |
| `pageButton` | `pageButton?: LocaleMessage;` | optional, inherited |  |
| `pageOf` | `pageOf?: LocaleMessage;` | optional, inherited |  |
| `pageSize` | `pageSize?: LocaleMessage;` | optional, inherited |  |
| `pagerInfo` | `pagerInfo?: LocaleMessage;` | optional, inherited |  |
| `pagerItems` | `pagerItems?: LocaleMessage;` | optional, inherited |  |
| `pagerLabel` | `pagerLabel?: LocaleMessage;` | optional, inherited |  |
| `partialSave` | `partialSave?: LocaleMessage;` | optional, inherited |  |
| `paste` | `paste?: LocaleMessage;` | optional, inherited |  |
| `pinEnd` | `pinEnd?: LocaleMessage;` | optional, inherited |  |
| `pinStart` | `pinStart?: LocaleMessage;` | optional, inherited |  |
| `preparingPrint` | `preparingPrint?: LocaleMessage;` | optional, inherited |  |
| `previousMonth` | `previousMonth?: LocaleMessage;` | optional, inherited |  |
| `previousPage` | `previousPage?: LocaleMessage;` | optional, inherited |  |
| `previousPages` | `previousPages?: LocaleMessage;` | optional, inherited |  |
| `print` | `print?: LocaleMessage;` | optional, inherited |  |
| `removeCondition` | `removeCondition?: LocaleMessage;` | optional, inherited |  |
| `removeGroup` | `removeGroup?: LocaleMessage;` | optional, inherited |  |
| `resizeColumn` | `resizeColumn?: LocaleMessage;` | optional, inherited |  |
| `retry` | `retry?: LocaleMessage;` | optional, inherited |  |
| `rowAdded` | `rowAdded?: LocaleMessage;` | optional, inherited |  |
| `rowDeleted` | `rowDeleted?: LocaleMessage;` | optional, inherited |  |
| `rowDragColumnHeader` | `rowDragColumnHeader?: LocaleMessage;` | optional, inherited |  |
| `rowDragHandle` | `rowDragHandle?: LocaleMessage;` | optional, inherited |  |
| `rowDragHandleRole` | `rowDragHandleRole?: LocaleMessage;` | optional, inherited |  |
| `rowErrors` | `rowErrors?: LocaleMessage;` | optional, inherited |  |
| `rowMoved` | `rowMoved?: LocaleMessage;` | optional, inherited |  |
| `rowNew` | `rowNew?: LocaleMessage;` | optional, inherited |  |
| `rowNumberColumnHeader` | `rowNumberColumnHeader?: LocaleMessage;` | optional, inherited |  |
| `rowsDeleted` | `rowsDeleted?: LocaleMessage;` | optional, inherited |  |
| `rowsDropped` | `rowsDropped?: LocaleMessage;` | optional, inherited |  |
| `rowsGrabbed` | `rowsGrabbed?: LocaleMessage;` | optional, inherited |  |
| `rowsSelected` | `rowsSelected?: LocaleMessage;` | optional, inherited |  |
| `save` | `save?: LocaleMessage;` | optional, inherited |  |
| `saveFailed` | `saveFailed?: LocaleMessage;` | optional, inherited |  |
| `saveRejected` | `saveRejected?: LocaleMessage;` | optional, inherited |  |
| `search` | `search?: LocaleMessage;` | optional, inherited |  |
| `searchColumns` | `searchColumns?: LocaleMessage;` | optional, inherited |  |
| `searchLabel` | `searchLabel?: LocaleMessage;` | optional, inherited |  |
| `searchMatches` | `searchMatches?: LocaleMessage;` | optional, inherited |  |
| `searchValues` | `searchValues?: LocaleMessage;` | optional, inherited |  |
| `selectAll` | `selectAll?: LocaleMessage;` | optional, inherited |  |
| `selectAllRows` | `selectAllRows?: LocaleMessage;` | optional, inherited |  |
| `selectRow` | `selectRow?: LocaleMessage;` | optional, inherited |  |
| `selectedCount` | `selectedCount?: LocaleMessage;` | optional, inherited |  |
| `selectionCleared` | `selectionCleared?: LocaleMessage;` | optional, inherited |  |
| `selectionColumnHeader` | `selectionColumnHeader?: LocaleMessage;` | optional, inherited |  |
| `sortAscending` | `sortAscending?: LocaleMessage;` | optional, inherited |  |
| `sortCleared` | `sortCleared?: LocaleMessage;` | optional, inherited |  |
| `sortDescending` | `sortDescending?: LocaleMessage;` | optional, inherited |  |
| `sortDialogTitle` | `sortDialogTitle?: LocaleMessage;` | optional, inherited |  |
| `sortedBy` | `sortedBy?: LocaleMessage;` | optional, inherited |  |
| `sum` | `sum?: LocaleMessage;` | optional, inherited |  |
| `timeLabel` | `timeLabel?: LocaleMessage;` | optional, inherited |  |
| `today` | `today?: LocaleMessage;` | optional, inherited |  |
| `toolbarLabel` | `toolbarLabel?: LocaleMessage;` | optional, inherited |  |
| `touchMultiSort` | `touchMultiSort?: LocaleMessage;` | optional, inherited |  |
| `true` | `true?: LocaleMessage;` | optional, inherited |  |
| `trueCount` | `trueCount?: LocaleMessage;` | optional, inherited |  |
| `unavailable` | `unavailable?: LocaleMessage;` | optional, inherited |  |
| `ungroup` | `ungroup?: LocaleMessage;` | optional, inherited |  |
| `ungroupByColumn` | `ungroupByColumn?: LocaleMessage;` | optional, inherited |  |
| `ungroupColumn` | `ungroupColumn?: LocaleMessage;` | optional, inherited |  |
| `unpin` | `unpin?: LocaleMessage;` | optional, inherited |  |
| `unsavedChangesLost` | `unsavedChangesLost?: LocaleMessage;` | optional, inherited |  |
| `update` | `update?: LocaleMessage;` | optional, inherited |  |
| `validationCreditcard` | `validationCreditcard?: LocaleMessage;` | optional, inherited |  |
| `validationDate` | `validationDate?: LocaleMessage;` | optional, inherited |  |
| `validationDateIso` | `validationDateIso?: LocaleMessage;` | optional, inherited |  |
| `validationDigits` | `validationDigits?: LocaleMessage;` | optional, inherited |  |
| `validationEmail` | `validationEmail?: LocaleMessage;` | optional, inherited |  |
| `validationMax` | `validationMax?: LocaleMessage;` | optional, inherited |  |
| `validationMaxLength` | `validationMaxLength?: LocaleMessage;` | optional, inherited |  |
| `validationMin` | `validationMin?: LocaleMessage;` | optional, inherited |  |
| `validationMinLength` | `validationMinLength?: LocaleMessage;` | optional, inherited |  |
| `validationNumber` | `validationNumber?: LocaleMessage;` | optional, inherited |  |
| `validationPattern` | `validationPattern?: LocaleMessage;` | optional, inherited |  |
| `validationRange` | `validationRange?: LocaleMessage;` | optional, inherited |  |
| `validationRangeLength` | `validationRangeLength?: LocaleMessage;` | optional, inherited |  |
| `validationRequired` | `validationRequired?: LocaleMessage;` | optional, inherited |  |
| `validationTel` | `validationTel?: LocaleMessage;` | optional, inherited |  |
| `validationUrl` | `validationUrl?: LocaleMessage;` | optional, inherited |  |
| `validationValidate` | `validationValidate?: LocaleMessage;` | optional, inherited |  |

### DataGridLocaleTextKey

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridLocaleTextKey

```ts
type DataGridLocaleTextKey = LocaleTextKey;
```

Keys of the built-in catalog (`DEFAULT_LOCALE_TEXT`).

### DataGridMergeCells

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridMergeCells

```ts
type DataGridMergeCells = boolean | 'rows' | 'columns';
```

DataGrid-wide merging of equal adjacent values: `true` both directions,
`'rows'` vertical (`rowSpan: true` on every column), `'columns'`
horizontal. A column's own `colSpan` / `rowSpan` wins.

### DataGridOverflow

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridOverflow

```ts
type DataGridOverflow = 'clip' | 'ellipsis' | 'ellipsisWithTooltip';
```

Overflow of cell and header text (CSS `text-overflow` vocabulary).

### DataGridPart

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridPart

```ts
type DataGridPart = 'root' | 'toolbar' | 'header' | 'headerCell' | 'body' | 'row' | 'cell' | 'footer' | 'pager' | 'groupDropArea' | 'groupCaption' | 'detailRow' | 'columnMenu' | 'contextMenu' | 'filterMenu' | 'editor' | 'empty' | 'loading';
```

### DataGridSortDirection

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSortDirection

```ts
type DataGridSortDirection = 'asc' | 'desc';
```

### DataGridSpan

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridSpan

```ts
type DataGridSpan<Row> = boolean | ((ctx: DataGridSpanContext<Row>) => number);
```

Span of a cell: a function returns an explicit span (1 = no span); `true`
merges equal adjacent non-empty values. Called for rendered rows only.

### DataGridStateMethods

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridStateMethods

```ts
type DataGridStateMethods = Omit<DataGridStateApi, 'initialState'>;
```

Instance state methods (`ref`, `useDataGridApi()`).

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `getState` | `getState: (options?: DataGridStateOptions \| undefined) => DataGridState;` | inherited | Persistable state (columns, pinning, sorting, filters, grouping, paging, search, selection, scroll). |
| `restoreState` | `restoreState: (state: string \| DataGridState, options?: (DataGridStateOptions & DeserializeDataGridStateOptions) \| undefined) => RestoreResult;` | inherited | Restores a state (object or serialized) in one batch without recompiling columns. |
| `resetState` | `resetState: () => RestoreResult;` | inherited | Restores the state captured when this API was created. |

### DataGridTextWrap

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTextWrap

```ts
type DataGridTextWrap = boolean | 'header' | 'content' | 'both';
```

### DataGridToolbarItemId

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridToolbarItemId

```ts
type DataGridToolbarItemId = 'add' | 'edit' | 'save' | 'delete' | 'cancel' | 'search' | 'print' | 'columnChooser' | 'exportExcel' | 'exportPdf' | 'exportCsv' | 'expandAll' | 'collapseAll' | 'copy' | 'filterBuilder' | 'indent' | 'outdent';
```

### DataGridTreeFilterMode

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeFilterMode

```ts
type DataGridTreeFilterMode = 'ancestors' | 'descendants' | 'both' | 'none';
```

Relatives a filter (or a copy) keeps: matches with their ancestors (default), descendants, both, or matches only.

### DataGridTreeLoadStatus

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridTreeLoadStatus

```ts
type DataGridTreeLoadStatus = 'idle' | 'loading' | 'loaded' | 'error';
```

Child load status of a lazy parent (`tree.hasChildrenField`).

### DataGridUiCommand

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridUiCommand

```ts
type DataGridUiCommand = 'edit.add' | 'edit.begin' | 'edit.delete' | 'edit.save' | 'edit.cancel' | 'clipboard.copy' | 'export.excel' | 'export.pdf' | 'export.csv' | 'grid.print';
```

Named UI commands the toolbar and menus run. A handler registered with
`api.registerCommandHandler` wins; otherwise a module that declares the
command type receives it through `dispatch`; otherwise the command is a
no-op with a development warning.

### DataGridViewChangeReason

Kind: type

Page: https://salmonui.dev/docs/reference/data-grid/DataGridViewChangeReason

```ts
type DataGridViewChangeReason = 'data' | 'sort' | 'filter' | 'search' | 'group' | 'page' | 'refresh';
```

What changed the view (`onViewChange`).

## Constants

### DATA_GRID_DEFAULT_LOCALE_TEXT

Kind: const

Page: https://salmonui.dev/docs/reference/data-grid/DATA_GRID_DEFAULT_LOCALE_TEXT

```ts
const DEFAULT_LOCALE_TEXT: Readonly<{
    noRows: string;
    loading: string;
    loaded: {
        one: string;
        other: string;
    };
    dataError: string;
    error: string;
    retry: string;
    dataErrorTitle: string;
    rowNumberColumnHeader: string;
    true: string;
    false: string;
    lookupLoading: string;
    lookupError: string;
    selectRow: string;
    selectAllRows: string;
    selectionColumnHeader: string;
    rowsSelected: {
        one: string;
        other: string;
    };
    selectionCleared: string;
    allRowsSelected: string;
    sortAscending: string;
    sortDescending: string;
    clearSort: string;
    ascending: string;
    descending: string;
    sortedBy: string;
    sortCleared: string;
    touchMultiSort: string;
    filter: string;
    clear: string;
    ok: string;
    selectAll: string;
    blank: string;
    matchCase: string;
    and: string;
    or: string;
    noMatches: string;
    filtered: {
        one: string;
        other: string;
    };
    filterOperator: string;
    filterValue: string;
    filterBuilder: string;
    filterField: string;
    filterGroup: string;
    filterNot: string;
    addCondition: string;
    addGroup: string;
    removeCondition: string;
    removeGroup: string;
    filterFrom: string;
    filterTo: string;
    filterButton: string;
    filterMenuLabel: string;
    filterBarInput: string;
    filterBarOperator: string;
    filterStatus: string;
    filterStatusCondition: string;
    filterStatusSeparator: string;
    searchValues: string;
    operatorEqual: string;
    operatorNotEqual: string;
    operatorContains: string;
    operatorDoesNotContain: string;
    operatorStartsWith: string;
    operatorDoesNotStartWith: string;
    operatorEndsWith: string;
    operatorDoesNotEndWith: string;
    operatorIsEmpty: string;
    operatorIsNotEmpty: string;
    operatorIsNull: string;
    operatorIsNotNull: string;
    operatorGreaterThan: string;
    operatorGreaterThanOrEqual: string;
    operatorLessThan: string;
    operatorLessThanOrEqual: string;
    operatorBetween: string;
    operatorIn: string;
    operatorNotIn: string;
    operatorLike: string;
    operatorWildcard: string;
    search: string;
    searchLabel: string;
    clearSearch: string;
    searchMatches: {
        one: string;
        other: string;
    };
    groupPanel: string;
    groupPanelLabel: string;
    group: string;
    ungroup: string;
    ungroupColumn: string;
    groupByColumn: string;
    ungroupByColumn: string;
    groupChip: string;
    groupChipToggle: string;
    groupItems: {
        one: string;
        other: string;
    };
    groupLevel: {
        one: string;
        other: string;
    };
    blankGroup: string;
    groupLoading: string;
    groupLoadFailed: string;
    loadMore: string;
    expand: string;
    collapse: string;
    expandGroup: string;
    collapseGroup: string;
    expandAll: string;
    collapseAll: string;
    sum: string;
    average: string;
    min: string;
    max: string;
    count: string;
    trueCount: string;
    falseCount: string;
    custom: string;
    pagerLabel: string;
    firstPage: string;
    previousPage: string;
    nextPage: string;
    lastPage: string;
    previousPages: string;
    nextPages: string;
    pageButton: string;
    pageOf: string;
    pagerInfo: string;
    pagerItems: {
        one: string;
        other: string;
    };
    pageSize: string;
    allRows: string;
    columnChooser: string;
    chooseColumns: string;
    searchColumns: string;
    columnsShown: string;
    resizeColumn: string;
    columnResizer: string;
    autoSize: string;
    autoSizeAll: string;
    pinStart: string;
    pinEnd: string;
    unpin: string;
    columnPinnedStart: string;
    columnPinnedEnd: string;
    columnPinnedCenter: string;
    columnUnpinned: string;
    columnMenuButton: string;
    columnMenuLabel: string;
    contextMenuLabel: string;
    toolbarLabel: string;
    more: string;
    unavailable: string;
    featureEditing: string;
    featureClipboard: string;
    featureExcelExport: string;
    featurePdfExport: string;
    featureCsvExport: string;
    featurePrint: string;
    featureGrouping: string;
    featureSearch: string;
    add: string;
    edit: string;
    delete: string;
    update: string;
    cancel: string;
    save: string;
    editDialogTitle: string;
    addDialogTitle: string;
    closeDialog: string;
    confirmTitle: string;
    rowErrors: string;
    newRowErrors: string;
    confirmDelete: {
        one: string;
        other: string;
    };
    confirmSave: string;
    confirmDiscard: string;
    unsavedChangesLost: string;
    editingCell: string;
    editingRow: string;
    editSaved: string;
    editCancelled: string;
    rowAdded: string;
    rowsDeleted: {
        one: string;
        other: string;
    };
    saveFailed: string;
    saveRejected: string;
    partialSave: string;
    conflict: string;
    editorLabel: string;
    cellChanged: string;
    cellInvalid: string;
    rowNew: string;
    newRowLabel: string;
    rowDeleted: string;
    fillHandle: string;
    validationRequired: string;
    validationMin: string;
    validationMax: string;
    validationRange: string;
    validationMinLength: string;
    validationMaxLength: string;
    validationRangeLength: string;
    validationNumber: string;
    validationDigits: string;
    validationEmail: string;
    validationUrl: string;
    validationDate: string;
    validationDateIso: string;
    validationCreditcard: string;
    validationTel: string;
    validationPattern: string;
    validationValidate: string;
    chooseDate: string;
    previousMonth: string;
    nextMonth: string;
    today: string;
    timeLabel: string;
    adaptiveBarLabel: string;
    sortDialogTitle: string;
    filterDialogTitle: string;
    adaptiveSortNone: string;
    adaptiveSortAscending: string;
    adaptiveSortDescending: string;
    adaptiveApply: string;
    adaptiveClose: string;
    multiSelect: string;
    selectedCount: string;
    adaptiveFiltered: string;
    detailColumnHeader: string;
    expandDetail: string;
    collapseDetail: string;
    detailLoading: string;
    childGridLabel: string;
    rowDragColumnHeader: string;
    rowDragHandle: string;
    rowDragHandleRole: string;
    rowsGrabbed: {
        one: string;
        other: string;
    };
    rowMoved: string;
    rowsDropped: string;
    indent: string;
    outdent: string;
    export: string;
    exportExcel: string;
    exportPdf: string;
    exportCsv: string;
    exporting: string;
    preparingPrint: string;
    print: string;
    copy: string;
    paste: string;
    clipboardCopyHint: string;
    clipboardPasteHint: string;
    clipboardText: string;
}>;
```

Built-in English text for every user-visible core and renderer string. Keys are flat camelCase; parameters are listed per key. Menu and
toolbar item labels use the item id as the key (`sortAscending`,
`columnChooser`, `exportExcel`, ...).

### DATA_GRID_DETAIL_COLUMN_ID

Kind: const

Page: https://salmonui.dev/docs/reference/data-grid/DATA_GRID_DETAIL_COLUMN_ID

```ts
const DETAIL_COLUMN_ID = "__salmon_detail";
```

Column id of the detail expand/collapse column.

### DATA_GRID_ROW_DRAG_COLUMN_ID

Kind: const

Page: https://salmonui.dev/docs/reference/data-grid/DATA_GRID_ROW_DRAG_COLUMN_ID

```ts
const ROW_DRAG_COLUMN_ID = "__salmon_drag";
```

Column id of the row drag handle column.

### DATA_GRID_ROW_NUMBER_COLUMN_ID

Kind: const

Page: https://salmonui.dev/docs/reference/data-grid/DATA_GRID_ROW_NUMBER_COLUMN_ID

```ts
const ROW_NUMBER_COLUMN_ID = "__salmon_row_number";
```

Default id of a `type: 'rowNumber'` column without `id` or `field`.

### DATA_GRID_SELECTION_COLUMN_ID

Kind: const

Page: https://salmonui.dev/docs/reference/data-grid/DATA_GRID_SELECTION_COLUMN_ID

```ts
const SELECTION_COLUMN_ID = "__salmon_select";
```

Default id of the `type: "selection"` checkbox column.

## Re-exported entry points

- [@salmonui/data-grid/features](https://salmonui.dev/docs/reference/data-grid/features.md): 2 symbols: 1 interface and 1 type
  `DataGridFeature`, `DataGridFeatureName`
- [@salmonui/data-grid/engine](https://salmonui.dev/docs/reference/data-grid/engine.md): 41 symbols: 4 functions, 25 interfaces, 11 types and 1 constant
  `AggregateType`, `AggregateValues`, `CellRange`, `CellSnapshot`, `ColumnDef`, `ColumnId`, `ColumnType`, `ColumnWidth`, `CompiledColumn`, `DEFAULT_KEY_BINDINGS`, `DataGridCommand`, `DataGridEngine`, `DataGridModule`, `DataGridSnapshot`, `DataGridState`, `DataGridStateOptions`, `DataGridStatePart`, `DataGridStateStorageAdapter`, `DataGridWarning`, `DataQuery`, `DataSource`, `DataSourceRequest`, `DataSourceResult`, `FilterDescriptor`, `FormatOptions`, `GroupDescriptor`, `GroupPathSegment`, `GroupRowSnapshot`, `KeyBinding`, `LocalDataSource`, `RowDragHandoff`, `RowId`, `RowSnapshot`, `SelectionSummary`, `SerializedSelection`, `SortDescriptor`, `VirtualRange`, `createAggregatesModule`, `createGroupingModule`, `createLocalDataSource`, `defineDataGridModule`
- [@salmonui/data-grid/engine/row-drag-state](https://salmonui.dev/docs/reference/data-grid/engine-row-drag-state.md): 1 symbol: 1 function
  `createRowDragHandoff`
- [@salmonui/data-grid/engine/persistence](https://salmonui.dev/docs/reference/data-grid/engine-persistence.md): 2 symbols: 2 functions
  `deserializeDataGridState`, `serializeDataGridState`
