View as Markdown

API reference: @salmonui/data-grid

DataGridColumnChooserinterface

import type { DataGridColumnChooser } from '@salmonui/data-grid';
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;
}
DataGridColumnChooser members (8)
NameSignatureDescription
searchableoptionalreadonly searchable?: boolean;

Search box above the list (enableSearching). Default true.

searchOperatoroptionalreadonly searchOperator?: 'contains' | 'startsWith' | 'endsWith' | 'equal';

Search operator (columnChooserSettings.operator). Default contains.

ignoreAccentsoptionalreadonly ignoreAccents?: boolean;

Search ignores diacritics (ignoreAccent): "resume" finds "Résumé". Default false.

debounceoptionalreadonly debounce?: number;

Delay in ms before typed search text filters the list (immediateModeDelay). Default 0.

modeoptionalreadonly mode?: 'confirm' | 'immediate';

confirm (default): OK applies, Cancel discards. immediate: every toggle applies.

renderChooseroptionalreadonly renderChooser?: (ctx: DataGridColumnChooserContext<Row>) => ReactNode;

Replaces the search box and the column list (template, renderCustomColumnChooser); defaultContent is the built-in.

renderHeaderoptionalreadonly renderHeader?: (ctx: DataGridColumnChooserContext<Row>) => ReactNode;

Content above the search box (headerTemplate).

renderFooteroptionalreadonly renderFooter?: (ctx: DataGridColumnChooserContext<Row>) => ReactNode;

Replaces the OK / Cancel buttons (footerTemplate); defaultContent is the built-in buttons.