# Quick Search Technical Reference

Canonical page: https://www.adaptabletools.com/docs/technical-reference-quick-search

## Quick Search Options

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [clearQuickSearchOnStartUp](https://www.adaptabletools.com/docs/reference/quicksearchoptions.md#clearquicksearchonstartup) | `boolean` | Clears saved searches when AdapTable loads | false |
| [filterGridAfterQuickSearch](https://www.adaptabletools.com/docs/reference/quicksearchoptions.md#filtergridafterquicksearch) | `boolean` | Filters Grid after quick search so only matching rows are displayed | false |
| [getCellSearchText](https://www.adaptabletools.com/docs/reference/quicksearchoptions.md#getcellsearchtext) | `(quickSearchContext: `[`QuickSearchContext`](https://www.adaptabletools.com/docs/reference/quicksearchcontext.md)`) => string \| null` | Allows a different value to be used for a cell when searching (instead of its raw value) |   |
| [isCellSearchable](https://www.adaptabletools.com/docs/reference/quicksearchoptions.md#iscellsearchable) | `(quickSearchContext: `[`QuickSearchContext`](https://www.adaptabletools.com/docs/reference/quicksearchcontext.md)`) => boolean` | Determines whether Quick Search should be applied to a given cell |   |
| [isQuickSearchCaseSensitive](https://www.adaptabletools.com/docs/reference/quicksearchoptions.md#isquicksearchcasesensitive) | `boolean` | Run Quick Search using Case Sensitivity | false |
| [quickSearchPlaceholder](https://www.adaptabletools.com/docs/reference/quicksearchoptions.md#quicksearchplaceholder) | `string` | Value to use as placeholder in QuickSearch controls (e.g. in Dashboard) | &#39;Search&#39; |

`getCellSearchText` and `isCellSearchable` receive a [`QuickSearchContext`](https://www.adaptabletools.com/docs/reference/quicksearchcontext.md):

| Property | Type | Description |
| --- | --- | --- |
| [gridCell](https://www.adaptabletools.com/docs/reference/quicksearchcontext.md#gridcell) | [`GridCell`](https://www.adaptabletools.com/docs/reference/gridcell.md) | Cell being checked |
| [quickSearchValue](https://www.adaptabletools.com/docs/reference/quicksearchcontext.md#quicksearchvalue) | `string` | Current Quick Search Text |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/quicksearchcontext.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

-----------

## Quick Search Initial State

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [CellMatchStyle](https://www.adaptabletools.com/docs/reference/quicksearchstate.md#cellmatchstyle) | `Omit<`[`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md)`, 'ClassName'>` | Style used to highlight matching cells |   |
| [CurrentTextMatchStyle](https://www.adaptabletools.com/docs/reference/quicksearchstate.md#currenttextmatchstyle) | `Omit<`[`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md)`, 'ClassName'>` | Style used to highlight the current match within a cell (not available with the Server-Side Row Model) | `var(--ab-color-quick-search-current-match)` background, `var(--ab-color-quick-search-current-match-foreground)` text, bold |
| [QuickSearchText](https://www.adaptabletools.com/docs/reference/quicksearchstate.md#quicksearchtext) | `string` | Last Quick Search that was run (and will be applied at start-up) |   |
| [TextMatchStyle](https://www.adaptabletools.com/docs/reference/quicksearchstate.md#textmatchstyle) | `Omit<`[`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md)`, 'ClassName'>` | Style used to highlight matching text within a cell (not available with the Server-Side Row Model) | `var(--ab-color-quick-search-match)` background and `var(--ab-color-quick-search-match-foreground)` text |

`CellMatchStyle`, `TextMatchStyle` and `CurrentTextMatchStyle` are each an [`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md) object:

| Property | Type | Description |
| --- | --- | --- |
| [ClassName](https://www.adaptabletools.com/docs/reference/adaptablestyle.md#classname) | `string` | CSS class added to the cell. Colour, font and border properties on this object are still applied. |

-----------

## Quick Search API

| Method | Returns | Description |
| --- | --- | --- |
| [clearQuickSearch()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#clearquicksearch) | `void` | Clears Quick Search |
| [getQuickSearchCellMatchStyle()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#getquicksearchcellmatchstyle) | [`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md)` \| undefined` | Retrieves whole-cell style for matching Quick Search cells (undefined when unset on client-side) |
| [getQuickSearchCurrentTextMatchStyle()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#getquicksearchcurrenttextmatchstyle) | `Omit<`[`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md)`, 'ClassName'>` | Retrieves the style for the active Quick Search match (includes run-time default when unset) |
| [getQuickSearchState()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#getquicksearchstate) | [`QuickSearchState`](https://www.adaptabletools.com/docs/reference/quicksearchstate.md) | Retrieves Quick Search section from Adaptable State |
| [getQuickSearchTextMatchStyle()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#getquicksearchtextmatchstyle) | `Omit<`[`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md)`, 'ClassName'>` | Retrieves the style for matched text within Quick Search results (includes run-time default when unset) |
| [getQuickSearchValue()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#getquicksearchvalue) | `string` | Retrieves current Quick Search text |
| [gotoNextMatch()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#gotonextmatch) | `void` | Goes to the next match for the current Quick Search text |
| [gotoPreviousMatch()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#gotopreviousmatch) | `void` | Goes to the previous match for the current Quick Search text |
| [hideFloatingQuickSearch()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#hidefloatingquicksearch) | `void` | Hides the floating Quick Search |
| [openQuickSearchSettingsPanel()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#openquicksearchsettingspanel) | `void` | Opens Settings Panel with Quick Search section selected and visible |
| [runQuickSearch(quickSearchText)](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#runquicksearch) | `void` | Runs Quick Search using supplied text |
| [setQuickSearchCellMatchStyle(style)](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#setquicksearchcellmatchstyle) | `void` | Sets whole-cell style for Quick Search (SSRM / legacy). Prefer `setQuickSearchTextMatchStyle`<br/>for client-side row models using AG Grid Find. |
| [setQuickSearchCurrentTextMatchStyle(style)](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#setquicksearchcurrenttextmatchstyle) | `void` | Sets style for the active Quick Search match when cycling results (AG Grid Find) |
| [setQuickSearchTextMatchStyle(style)](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#setquicksearchtextmatchstyle) | `void` | Sets style for matched text within Quick Search results (AG Grid Find) |
| [showFloatingQuickSearch()](https://www.adaptabletools.com/docs/reference/quicksearchapi.md#showfloatingquicksearch) | `void` | Opens the Floating Quick Search |
