# QuickSearchApi

Canonical page: https://www.adaptabletools.com/docs/reference/quicksearchapi

Quick Search: the current search text, the next and previous match, and the match styles.

```ts title="TypeScript"
export interface QuickSearchApi 
```

## Methods

| 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 |

## Method Details

### clearQuickSearch

Clears Quick Search

```ts title="TypeScript"
clearQuickSearch(): void;
```

###### Returns

`void`

### getQuickSearchCellMatchStyle

Retrieves whole-cell style for matching Quick Search cells (undefined when unset on client-side)

```ts title="TypeScript"
getQuickSearchCellMatchStyle(): AdaptableStyle | undefined;
```

###### Returns

 Whole-cell style for matching Quick Search cells (undefined when unset on client-side)

[`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md)` | undefined`

### getQuickSearchCurrentTextMatchStyle

Retrieves the style for the active Quick Search match (includes run-time default when unset)

```ts title="TypeScript"
getQuickSearchCurrentTextMatchStyle(): Omit<AdaptableStyle, 'ClassName'>;
```

###### Returns

 The style for the active Quick Search match (includes run-time default when unset)

`Omit<`[`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md)`, 'ClassName'>`

### getQuickSearchState

Retrieves Quick Search section from Adaptable State

```ts title="TypeScript"
getQuickSearchState(): QuickSearchState;
```

###### Returns

 Quick Search section from Adaptable State

[`QuickSearchState`](https://www.adaptabletools.com/docs/reference/quicksearchstate.md)

### getQuickSearchTextMatchStyle

Retrieves the style for matched text within Quick Search results (includes run-time default when unset)

```ts title="TypeScript"
getQuickSearchTextMatchStyle(): Omit<AdaptableStyle, 'ClassName'>;
```

###### Returns

 The style for matched text within Quick Search results (includes run-time default when unset)

`Omit<`[`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md)`, 'ClassName'>`

### getQuickSearchValue

Retrieves current Quick Search text

```ts title="TypeScript"
getQuickSearchValue(): string;
```

###### Returns

 Current Quick Search text

`string`

### gotoNextMatch

Goes to the next match for the current Quick Search text

```ts title="TypeScript"
gotoNextMatch(): void;
```

###### Returns

`void`

### gotoPreviousMatch

Goes to the previous match for the current Quick Search text

```ts title="TypeScript"
gotoPreviousMatch(): void;
```

###### Returns

`void`

### hideFloatingQuickSearch

Hides the floating Quick Search

```ts title="TypeScript"
hideFloatingQuickSearch(): void;
```

###### Returns

`void`

### openQuickSearchSettingsPanel

Opens Settings Panel with Quick Search section selected and visible

```ts title="TypeScript"
openQuickSearchSettingsPanel(): void;
```

###### Returns

`void`

### runQuickSearch

Runs Quick Search using supplied text

```ts title="TypeScript"
runQuickSearch(quickSearchText: string): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| quickSearchText | `string` | text to run QuickSearch on |

###### Returns

`void`

### setQuickSearchCellMatchStyle

Sets whole-cell style for Quick Search (SSRM / legacy). Prefer `setQuickSearchTextMatchStyle`
for client-side row models using AG Grid Find.

```ts title="TypeScript"
setQuickSearchCellMatchStyle(style: AdaptableStyle): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| style | [`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md) | the style to use |

###### Returns

`void`

### setQuickSearchCurrentTextMatchStyle

Sets style for the active Quick Search match when cycling results (AG Grid Find)

```ts title="TypeScript"
setQuickSearchCurrentTextMatchStyle(style: AdaptableStyle): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| style | [`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md) | the style to use |

###### Returns

`void`

### setQuickSearchTextMatchStyle

Sets style for matched text within Quick Search results (AG Grid Find)

```ts title="TypeScript"
setQuickSearchTextMatchStyle(style: AdaptableStyle): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| style | [`AdaptableStyle`](https://www.adaptabletools.com/docs/reference/adaptablestyle.md) | the style to use |

###### Returns

`void`

### showFloatingQuickSearch

Opens the Floating Quick Search

```ts title="TypeScript"
showFloatingQuickSearch(): void;
```

###### Returns

`void`
