# Configuring Quick Search

Canonical page: https://www.adaptabletools.com/docs/handbook-quick-search-configuring

- AdapTable allows users (both at run time and design time) to configure Quick Search including:
  - custom search text per cell (`getCellSearchText`) and excluding cells (`isCellSearchable`)
  - case sensitivity, input placeholder, and whether the last search is restored on startup
  - floating Quick Search opened via API or keyboard
- Row filtering after search (`filterGridAfterQuickSearch`) is documented on [Filtering Quick Search Results](https://www.adaptabletools.com/docs/handbook-quick-search-as-filter/index.md)

Essentially [Quick Search](https://www.adaptabletools.com/docs/handbook-quick-search/index.md) is a very straightforward operation.

It simply highlights any cells in any column which contain the matching term using a default style.

And AdapTable will re-apply an active Quick Search when the application re-opens.

However AdapTable provides many configuration options so Search can meet precise requirements.

## Searching on Raw Value

By default Quick Search will return true or false if the **display value** in a cell contains the search text.

This means, for example, that searching for 5000 in a cell with a display value of £5,000 will return false (due to the missing comma).

As a result, sometimes this default behaviour does not meet the particular requirements.

Developers can tell Quick Search to search on the **raw value**, instead, by using the `getCellSearchText` property in [Quick Search Options](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md).

### `getCellSearchText`

Function enabling custom Quick Search implementations

Use this property to override the text AdapTable searches for a Cell. By default that is the Cell's **display value**.

The function receives a [`QuickSearchContext`](https://www.adaptabletools.com/docs/reference/quicksearchcontext.md) object and returns the string to search (or `null` to skip the Cell):

```ts
getCellSearchText?(quickSearchContext: QuickSearchContext): string | null;
```

The `QuickSearchContext` object contains 2 properties:

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

As noted, the most common use case is to use the property to search on the raw value:

```ts {4,5}
// Search on cell raw value for Github Stars
const adaptableOptions: AdaptableOptions = {
  quickSearchOptions: {
    getCellSearchText(context: QuickSearchContext) {
      return context.gridCell.column.columnId == 'github_stars'
        ? context.gridCell.rawValue
        : context.gridCell.displayValue;
    },
  }
} 
```

However it is also possible to leverage this function for more bespoke searching requirements (see the section below for more details):

```ts {4,12}
// Enable quick search text with commas and search for any matches
const adaptableOptions: AdaptableOptions = {
  quickSearchOptions: {
    getCellSearchText(context: QuickSearchContext) {
      const values = context.quickSearchValue
        .split(',')
        .map(x => x.trim().toLocaleLowerCase())
        .filter(x => Boolean(x));
      const isMatch: boolean = values.some(x =>
        String(context.gridCell.displayValue).toLocaleLowerCase().includes(x)
      );
      return isMatch ? context.quickSearchValue : context.gridCell.rawValue;
    },
  },
};
```

**Example: Quick Search Raw Value**

Running Quick Search using the Cell's Raw Value

- In this demo we use the `getCellSearchText` function to tell AdapTable to search using **raw cell value** on the `Github Stars` column
- We provide a distinctive [Number Display Format](https://www.adaptabletools.com/docs/handbook-column-formatting-display-format-number/index.md) for Github Stars and Github Watchers 
- We search for "1794" and the first cell in the Github Stars is returned because it matches the raw value

- Search for `667` and note that the first cell in Github Watchers does not match — the raw value matches but the formatted display value does not

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {
  AdaptableOptions,
  AdaptableColumn,
  QuickSearchContext,
} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Quick Search Raw Value',
  quickSearchOptions: {
    getCellSearchText(context: QuickSearchContext) {
      return context.gridCell.column.columnId == 'github_stars'
        ? context.gridCell.rawValue
        : context.gridCell.displayValue;
    },
  },
  initialState: {
    Dashboard: {
      ModuleButtons: ['QuickSearch'],
    },
    QuickSearch: {
      QuickSearchText: '1794',
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['QuickSearch'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    FormatColumn: {
      FormatColumns: [
        {
          Name: 'formatColumn-github_stars',
          Scope: {
            ColumnIds: ['github_stars', 'github_watchers'],
          },
          DisplayFormat: {
            Formatter: 'NumberFormatter',
            Options: {
              Prefix: '£',
              IntegerDigits: 2,
              IntegerSeparator: ' ',
            },
          },
        },
      ],
    },
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          Name: 'Standard Layout',
          TableColumns: [
            'name',
            'language',
            'description',
            'github_stars',
            'github_watchers',
            'topics',
            'license',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',

            'open_issues_count',
          ],
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

## Providing Custom Quick Search

In addition to enabling searching on raw value (see section above), the `getCellSearchText` property in [Quick Search Options](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md) also allows developers to provide their own, bespoke, Quick Search implementation.

- A bespoke Quick Search implementation should **not** be provided if you are running [Quick Search as a Filter](https://www.adaptabletools.com/docs/handbook-quick-search-as-filter/index.md)
- This is because AG Grid's native filter evaluation is used, which will be unaware of the bespoke implementation

This is particularly useful if you want to search for patterns, or across multiple cells.

Another common use case is to allow commas (or pipes) so cells containing any of the search values are returned

- When running a bespoke Quick Search, ensure that you set `CellMatchStyle` in [Quick Search Initial State](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md)
- This is required because AG Grid cannot style the matching text, so you will need to [style the entire matching cell](https://www.adaptabletools.com/docs/handbook-quick-search-matching-styles/index.md)

**Example: Bespoke Quick Search**

Providing a bespoke Quick Search implementation

- In this demo we provide a **bespoke** Quick Search implementation by using the `getCellSearchText` in [Quick Search Options](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md)
- Our implementation allows comma-separated search terms by returning the Quick Search text for matching cells (so the cell is treated as a match)
- We set an initial Quick Search for 'js, html' and we see that all cells which contain either of those search terms are matched
- We also provide a `CellMatchStyle` in [Quick Search Initial State](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md) to highlight matching cells

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {
  AdaptableOptions,
  AdaptableColumn,
  QuickSearchContext,
} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Bespoke Quick Search',
  quickSearchOptions: {
    getCellSearchText(context: QuickSearchContext) {
      const values = context.quickSearchValue
        .split(',')
        .map(x => x.trim().toLocaleLowerCase())
        .filter(x => Boolean(x));

      const isMatch: boolean = values.some(x =>
        String(context.gridCell.displayValue).toLocaleLowerCase().includes(x)
      );

      return isMatch ? context.quickSearchValue : context.gridCell.rawValue;
    },
  },

  initialState: {
    Dashboard: {
      ModuleButtons: ['QuickSearch'],
    },
    QuickSearch: {
      QuickSearchText: 'js, html',
      CellMatchStyle: {
        BackColor: 'var(--ab-color-palette-21)',
        ForeColor: 'var(--ab-color-palette-13)',
      },
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['QuickSearch'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          Name: 'Standard Layout',
          TableColumns: [
            'name',
            'language',
            'description',
            'github_stars',
            'topics',
            'license',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'open_issues_count',
          ],
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

- If performing a bespoke Quick Search, the up / down arrows enabling cycling through the result set will not work
- Additionally, `TextMatchStyle` and `CurrentTextMatchStyle` in [Quick Search Matching Styles](https://www.adaptabletools.com/docs/handbook-quick-search-matching-styles/index.md) are ignored

## Excluding Cells from Quick Search

By default **every** visible Cell in AG Grid will be included in Quick Search.

This can be changed by setting the `isCellSearchable` function in [Quick Search Options](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md).

This is particularly useful in cases where an AG Grid [Cell Component](https://www.ag-grid.com/javascript-data-grid/cell-rendering/) causes false positives in the Search results

### `isCellSearchable`

Function enabling specific Cells to be excluded from Quick Search

The function receives a [`QuickSearchContext`](https://www.adaptabletools.com/docs/reference/quicksearchcontext.md) object and returns a boolean:

```ts
isCellSearchable?: (quickSearchContext: QuickSearchContext) => boolean;
```

The `QuickSearchContext` object contains 2 properties:

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

```ts {4,5,6,7,8}
// Exclude 'Language' column and all ReadOnly columns from Quick Search
const adaptableOptions: AdaptableOptions = {
  quickSearchOptions: {
    isCellSearchable: (context: QuickSearchContext) => {
      if (context.gridCell.column.columnId === 'language' || context.gridCell.column.readOnly) {
          return false;
      }
      return true;
    },
  }
} 
```

- This function should not be provided if you are running [Quick Search as a Filter](https://www.adaptabletools.com/docs/handbook-quick-search-as-filter/index.md)
- AG Grid's native filter evaluation will be unaware of these Cell and Column exclusions and use the full set

**Example: Quick Search Exclude Cells**

Excluding Cells from Quick Search

- In this demo we have provided an implementation for the `isCellSearchable` function in order to exclude:
  - the *Description* column (excluded by name)
  - any columns with a data type of Text Array (which includes the *Topics* column)

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/columnDefs.ts`**

```ts
import {ColDef} from 'ag-grid-enterprise';

export const columnDefs: ColDef[] = [
  {
    field: 'id',
    cellDataType: 'number',
    hide: true,
    editable: false,
  },
  {
    field: 'topics',
    cellDataType: 'textArray',
    editable: false,
    sortable: false,
  },
  {
    field: 'name',
    cellDataType: 'text',
    editable: false,
  },
  {
    field: 'language',
    cellDataType: 'text',
    enablePivot: true,
    enableRowGroup: true,
  },
  {
    field: 'github_stars',
    headerName: 'GitHub Stars',
    cellDataType: 'number',
    enableValue: true,
  },

  {
    field: 'license',
    cellDataType: 'text',
    editable: true,
    enablePivot: true,
    enableRowGroup: true,
  },
  {
    field: 'week_issue_change',
    headerName: 'Issue Change',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'created_at',
    headerName: 'Created',
    cellDataType: 'date',
  },
  {field: 'has_wiki', headerName: 'Has Wiki', cellDataType: 'boolean'},
  {
    field: 'updated_at',
    headerName: 'Updated',
    cellDataType: 'date',
  },
  {
    field: 'pushed_at',
    headerName: 'Pushed',
    cellDataType: 'date',
  },
  {
    field: 'github_watchers',
    headerName: 'GitHub Watchers',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'open_issues_count',
    headerName: 'Open Issues',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'closed_issues_count',
    headerName: 'Closed Issues',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'description',
    cellDataType: 'text',
    sortable: false,
  },

  {
    field: 'open_pr_count',
    headerName: 'Open PRs',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'closed_pr_count',
    headerName: 'Closed PRs',
    cellDataType: 'number',
    enableValue: true,
  },
  {field: 'has_projects', headerName: 'Has Projects', cellDataType: 'boolean'},
  {field: 'has_pages', headerName: 'Has Pages', cellDataType: 'boolean'},
];
```
**`src/adaptableOptions.ts`**

```ts
import {
  AdaptableOptions,
  AdaptableColumn,
  QuickSearchContext,
} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Quick Search Exclude Cells',
  quickSearchOptions: {
    isCellSearchable: (context: QuickSearchContext) => {
      const column: AdaptableColumn = context.gridCell.column;
      if (column.columnId === 'name') {
        console.log('readonly:', column.readOnly);
      }
      if (column.columnId === 'description' || column.dataType == 'textArray') {
        return false;
      }
      return true;
    },
  },
  initialState: {
    Dashboard: {
      ModuleButtons: ['QuickSearch'],
    },
    QuickSearch: {
      QuickSearchText: 'Java',
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['QuickSearch'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          Name: 'Standard Layout',
          TableColumns: [
            'name',
            'language',
            'description',
            'github_stars',
            'topics',
            'license',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'open_issues_count',
          ],
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

## Saving Quick Search Text

AdapTable automatically saves the last run Quick Search value into AdapTable State.

It will then re-apply the Quick Search when the Application is next reloaded.

If this behaviour is not desired, set the `clearQuickSearchOnStartUp` property in [Quick Search Options](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md) to *true*.

### `clearQuickSearchOnStartUp`

Clears saved Quick Search when AdapTable loads

This boolean property will ensure a saved Quick Search is cleared on application restart.

```ts {4}
// Clear the previously saved Quick Search when AdapTable restarts
const adaptableOptions: AdaptableOptions = {
    quickSearchOptions: {
        clearQuickSearchOnStartUp: true
    }
} 
```

The `clearFiltersOnStartUp` property in [Filter Options](https://www.adaptabletools.com/docs/technical-reference-filter/index.md) will clear any saved [Column Filters](https://www.adaptabletools.com/docs/handbook-column-filter/index.md) or [Grid Filter](https://www.adaptabletools.com/docs/handbook-grid-filter/index.md)

## Case Sensitivity

By default Quick Search is **case-insensitive**: a search for `java` will match a cell displaying `Java` or `JAVA`.

This can be changed - so that Search only matches text with the same case - by setting the `isQuickSearchCaseSensitive` property in [Quick Search Options](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md) to *true*.

### `isQuickSearchCaseSensitive`

Runs Quick Search using case sensitivity

When set to *true*, Quick Search will only match cells whose text contains the search value using the **same case**.

```ts {4}
// Run Quick Search using case sensitivity
const adaptableOptions: AdaptableOptions = {
    quickSearchOptions: {
        isQuickSearchCaseSensitive: true
    }
} 
```

This option applies to both the Client-Side Row Model and the [Server-Side Row Model](https://www.adaptabletools.com/docs/dev-guide-row-models-server-searching/index.md) implementations of Quick Search

## Changing Quick Search Placeholder

The default placeholder text in each Quick Search input is *Search*.

This can be modified via the `quickSearchPlaceholder` property in [Quick Search Options](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md)

### `quickSearchPlaceholder`

Sets the placeholder used in Quick Search inputs

This string property can set a custom placeholder in Quick Search inputs.

```ts {4}
// Set the Quick Search placeholder to be 'Find'
const adaptableOptions: AdaptableOptions = {
    quickSearchOptions: {
        quickSearchPlaceholder: 'Find'
    }
} 
```

**Example: Quick Search Placeholder**

Changing Quick Search Placeholder

- In this demo we have changed the `quickSearchPlaceholder` to be 'Find Text'
### Expand to see more

```ts
quickSearchOptions: {
    quickSearchPlaceholder: 'Find Text'
},
```

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Quick Search Placeholder',
  quickSearchOptions: {
    quickSearchPlaceholder: 'Find Text',
  },
  initialState: {
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['QuickSearch'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          Name: 'Standard Layout',
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'topics',
            'license',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'description',
            'open_issues_count',
          ],
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

## Floating Quick Search

Typically Quick Search is performed using the dedicated Quick Search input.

This is available, most typically in the Dashboard, but in multiple other places in AdapTable.

However there is also an option to use Floating Quick Search.

- This is especially useful when, for screen real estate reasons, the Dashboard and other UI components are hidden
- Another common use case is advanced users who do everything via the keyboard and try to reduce mouse usage

The Floating Quick Search appears in the top right of the screen (similar to its position in the Dashboard).

- Floating Quick Search is **opened** by calling `showFloatingQuickSearch` in [Quick Search API](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md)
- It is **closed** by calling `hideFloatingQuickSearch` in [Quick Search API](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md) or by pressing the ESC key

**Example: Floating Quick Search**

Using Floating Quick Search in AdapTable

 

- In this demo we listen to the KeyDown Event for the key combination: 'metaKey + shiftKey + s', 
- When that happens, we open the Floating Quick Search using the `showFloatingQuickSearch` function in [Quick Search API](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md)
- We have hidden the Dashboard to mimic a typical use case for this functionality

### Expand to see the key bindings

```ts
export const onAdaptableReady = ({adaptableApi}: AdaptableReadyInfo) => {
  document.addEventListener('keydown', event => {
    const {key, shiftKey, metaKey} = event;

    // metaKey is 'command key' on Mac and 'windows key' on PC
    if (key === 's' && metaKey && shiftKey) {
      event.preventDefault();
      adaptableApi.quickSearchApi.showFloatingQuickSearch();
    }
  });
};
```

- Click the Meta Key (windows key on PC, Command Key on Mac), Shift and 's' and see the Floating Quick Search
- Click the Escape Key to close the Floating Quick Search

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'HotKeys',
  initialState: {
    Dashboard: {IsHidden: true},
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'license',
            'has_projects',
            'has_pages',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'week_issue_change',
          ],
          Name: 'Standard Layout',
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```
**`src/onAdaptableReady.ts`**

```ts
import {AdaptableReadyInfo} from '@adaptabletools/adaptable';

export const onAdaptableReady = ({adaptableApi}: AdaptableReadyInfo) => {
  document.addEventListener('keydown', event => {
    const {key, shiftKey, metaKey} = event;

    // metaKey is 'command key' on Mac and 'windows key' on PC
    if (key === 's' && metaKey && shiftKey) {
      event.preventDefault();
      adaptableApi.quickSearchApi.showFloatingQuickSearch();
    }
  });
};
```

### FAQ

**Can we limit Quick Search to particular Cells or Column data types?**
Yes, you can. By default Quick Search works across ALL Cells in AdapTable.
To exclude a Column or Cell, use the `isCellSearchable` property in [Quick Search Options](https://www.adaptabletools.com/docs/technical-reference-quick-search/index.md).
