# DataGridCommandItem (@salmonui/data-grid)

> The DataGridCommandItem interface of @salmonui/data-grid: One button of a command column.

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

```ts
import type { DataGridCommandItem } 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 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`). |
