@kanunilabs/datagrid-react / ToolbarSearchOptions
Interface: ToolbarSearchOptions
Properties
applyOnBlur?
optionalapplyOnBlur?:boolean
Run the search at once when the box loses focus (and on Enter), instead of waiting out the debounce. Default true.
ariaLabel?
optionalariaLabel?:string
The box's accessible name, read by a screen reader. Default: the grid
dictionary's search word (toolbarSearch).
debounce?
optionaldebounce?:number
Milliseconds after the last keystroke before the search runs. Default 200.
maxLength?
optionalmaxLength?:number
Longest text the box accepts (the input's maxLength).
placeholder?
optionalplaceholder?:string
Placeholder text. Default: the grid's "Search…" in its language.
validate?
optionalvalidate?: (text) =>string|null
Check the text before it is searched. Return a message to show under the box (the text is then NOT sent, and the last valid search stays), or null when the text is fine. Runs on every change.
validate: (text) => /\p{Extended_Pictographic}/u.test(text) ? 'No emoji' : null
Parameters
text
string
Returns
string | null