# DataGridSorting (@salmonui/data-grid)

> The DataGridSorting interface of @salmonui/data-grid: sorting prop.

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

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

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

## Reference

Kind: interface

```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. |
