View as Markdown

API reference: @salmonui/data-grid

DataGridSearchBoxPropsinterface

import type { DataGridSearchBoxProps } from '@salmonui/data-grid';
interface DataGridSearchBoxProps<Row = unknown> {
    api?: DataGridApi<Row> | null;
    debounce?: number;
    placeholder?: string;
    'aria-label'?: string;
    className?: string;
    style?: CSSProperties;
    tabIndex?: number;
    disabled?: boolean;
    title?: string | undefined;
    onBeforeSearch?: (event: DataGridSearchBoxSearchEvent) => void;
    onFocus?: () => void;
    dataAttributes?: Readonly<Record<string, string | number | undefined>>;
    hidden?: boolean | undefined;
}
DataGridSearchBoxProps members (13)
NameSignatureDescription
apioptionalapi?: DataGridApi<Row> | null;

The grid to search when rendered outside its subtree.

debounceoptionaldebounce?: number;

Delay before typed text applies, in ms. Default 0 (Enter always applies at once).

placeholderoptionalplaceholder?: string;
aria-labeloptional'aria-label'?: string;

Accessible name of the search landmark. Default localeText.searchLabel.

classNameoptionalclassName?: string;
styleoptionalstyle?: CSSProperties;
tabIndexoptionaltabIndex?: number;

Roving tab index from a host (the toolbar).

disabledoptionaldisabled?: boolean;
titleoptionaltitle?: string | undefined;
onBeforeSearchoptionalonBeforeSearch?: (event: DataGridSearchBoxSearchEvent) => void;

Called before each search is applied; event.preventDefault() skips it (like grid before-events).

onFocusoptionalonFocus?: () => void;
dataAttributesoptionaldataAttributes?: Readonly<Record<string, string | number | undefined>>;

Extra attributes on the landmark (toolbar item hooks).

hiddenoptionalhidden?: boolean | undefined;