# DataGridColumnChooser (@salmonui/data-grid)

> The DataGridColumnChooser interface of @salmonui/data-grid.

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

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