View as Markdown

API reference: @salmonui/data-grid

DataGridSearchinterface

import type { DataGridSearch } from '@salmonui/data-grid';
interface DataGridSearch {
    text?: string;
    fields?: readonly string[];
    operator?: 'contains' | 'startsWith' | 'endsWith' | 'equal' | 'notEqual' | 'wildcard' | 'like';
    matchCase?: boolean;
    ignoreAccents?: boolean;
    highlight?: boolean;
}

search prop.

DataGridSearch members (6)
NameSignatureDescription
textoptionaltext?: string;
fieldsoptionalfields?: readonly string[];

Columns searched. Default: every searchable non-date column.

operatoroptionaloperator?: 'contains' | 'startsWith' | 'endsWith' | 'equal' | 'notEqual' | 'wildcard' | 'like';

Default contains. wildcard (* any sequence, ? one character) and like (% any sequence) match the whole value.

matchCaseoptionalmatchCase?: boolean;

Default false.

ignoreAccentsoptionalignoreAccents?: boolean;

Default false.

highlightoptionalhighlight?: boolean;

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.