Quick Search Technical Reference
Summary
- Quick Search Initial Adaptable State can set search text and a Highlight Style
- Quick Search Options contains properties to configure Search behaviour
- Quick Search API provides programmatic access to Quick Search
Quick Search Options
The QuickSearchOptions section of Adaptable Options contains these properties:
| Property | Type | Description | Default |
|---|---|---|---|
| clearQuickSearchOnStartUp | boolean | Clears saved searches when AdapTable loads | false |
| filterGridAfterQuickSearch | boolean | Filters Grid after quick search so only matching rows are displayed | false |
| getCellSearchText | (quickSearchContext:QuickSearchContext) => string | null | Allows a different value to be used for a cell when searching (instead of its raw value) | |
| isCellSearchable | (quickSearchContext:QuickSearchContext) => boolean | Determines whether Quick Search should be applied to a given cell | |
| isQuickSearchCaseSensitive | boolean | Run Quick Search using Case Sensitivity | false |
| quickSearchPlaceholder | string | Value to use as placeholder in QuickSearch controls (e.g. in Dashboard) | 'Search' |
Find Out More
See Configuring Search for further details and examples
Quick Search Initial Adaptable State
The Quick Search section of Adaptable State contains these properties:
| Property | Type | Description |
|---|---|---|
| CellMatchStyle | Omit<AdaptableStyle, 'ClassName'> | Style used to highlight matching cells |
| CurrentTextMatchStyle | Omit<AdaptableStyle, 'ClassName'> | Style used to highlight matching text within current match (not availale in SSRM) |
| QuickSearchText | string | Last Quick Search that was run (and will be applied at start-up) |
| TextMatchStyle | Omit<AdaptableStyle, 'ClassName'> | Style used to highlight matching text within a cell (not availale in SSRM) |
Quick Search API
The Quick Search section of Adaptable API contains functions for applying and managing Quick Searches:
| Method | Returns | Description |
|---|---|---|
| clearQuickSearch() | void | Clears Quick Search |
| getQuickSearchCellMatchStyle() | AdaptableStyle | undefined | Retrieves whole-cell style for matching Quick Search cells (undefined when unset on client-side) |
| getQuickSearchCurrentTextMatchStyle() | Omit<AdaptableStyle, 'ClassName'> | Retrieves the style for the active Quick Search match (includes run-time default when unset) |
| getQuickSearchState() | QuickSearchState | Retrieves Quick Search section from Adaptable State |
| getQuickSearchTextMatchStyle() | Omit<AdaptableStyle, 'ClassName'> | Retrieves the style for matched text within Quick Search results (includes run-time default when unset) |
| getQuickSearchValue() | string | Retrieves current Quick Search text |
| gotoNextMatch() | void | Goes to the next match for the current Quick Search text |
| gotoPreviousMatch() | void | Goes to the previous match for the current Quick Search text |
| hideFloatingQuickSearch() | void | Hides the floating Quick Search |
| openQuickSearchSettingsPanel() | void | Opens Settings Panel with Quick Search section selected and visible |
| runQuickSearch(quickSearchText) | void | Runs Quick Search using supplied text |
| setQuickSearchCellMatchStyle(style) | void | Sets whole-cell style for Quick Search (SSRM / legacy). Prefer setQuickSearchTextMatchStyle for client-side row models using AG Grid Find. |
| setQuickSearchCurrentTextMatchStyle(style) | void | Sets style for the active Quick Search match when cycling results (AG Grid Find) |
| setQuickSearchTextMatchStyle(style) | void | Sets style for matched text within Quick Search results (AG Grid Find) |
| showFloatingQuickSearch() | void | Opens the Floating Quick Search |