Quick Search Technical Reference

View as Markdown

Quick Search Options

QuickSearchOptions

Options for configuring Quick Search

Clears saved searches when AdapTable loads

Default

false

Filters Grid after quick search so only matching rows are displayed

Default

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

Run Quick Search using Case Sensitivity

Default

false

Value to use as placeholder in QuickSearch controls (e.g. in Dashboard)

Default

'Search'

getCellSearchText and isCellSearchable receive a QuickSearchContext:


Quick Search Initial State

QuickSearchState

Quick Search section of Adaptable State, including Initial State.

QuickSearchText is the search restored at startup. CellMatchStyle highlights matching cells. TextMatchStyle and CurrentTextMatchStyle highlight the matching text inside a cell; those two styles are not available with the Server-Side Row Model.

Extends

BaseState

CellMatchStyle?

Omit<AdaptableStyle, 'ClassName'>

Style used to highlight matching cells

Style used to highlight the current match within a cell (not available with the Server-Side Row Model)

Default

var(--ab-color-quick-search-current-match) background, var(--ab-color-quick-search-current-match-foreground) text, bold

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 available with the Server-Side Row Model)

Default

var(--ab-color-quick-search-match) background and var(--ab-color-quick-search-match-foreground) text

CellMatchStyle, TextMatchStyle and CurrentTextMatchStyle are each an AdaptableStyle object:

AdaptableStyle

Colours, font and border for a cell, header or highlight.

Text properties (ForeColor, FontWeight, FontStyle, TextDecoration, FontSize, Alignment) and box properties (BackColor, BorderColor, BorderRadius) are applied together. ClassName adds a CSS class and does not turn the other properties off. A Styled Column can take just the text slice (Font) or just the box slice (Cell).

CellFontStyle

The "text" half of an AdaptableStyle: everything that affects the rendering of text (and, by convention, the alignment of the cell's primary content block — for plain text that is text-align, for Badge it is the alignment of the badge row).

Used as a Font? slot on Styled Columns whose renderer paints a non-text primary content (Gradient tint, Percent Bar, Bullet Chart) so the column can still control the cell's text styling without inheriting any other properties from a Format Column.

Alignment?

Alignment

Align to Left, Right or Center

FontSize?

'XSmall' | 'Small' | 'Medium' | 'Large' | 'XLarge'

Size of font: XSmall, Small, Medium, Large or XLarge

FontStyle?

'Normal' | 'Italic'

Style of font: Normal or Italic

FontWeight?

'Normal' | 'Bold'

Weight of font: Normal or Bold

ForeColor?

string

Font colour in cell: hex, rgb(a) or name

TextDecoration?

'None' | 'Underline' | 'Overline' | 'LineThrough'

Decoration of font: None, Underline, Overline or LineThrough

CellBoxStyle

The "box" half of an AdaptableStyle: everything that paints the cell box (background colour and the border that wraps the cell).

Used as a Cell? slot on Styled Columns whose renderer paints into the cell content but leaves the cell chrome alone (Rating, Sparkline) so the column can opt-in to a tinted/bordered cell without inheriting other properties from a Format Column.

BackColor?

string

Colour background of cell: hex, rgb(a) or name

Colour of cell border: hex, rgb(a) or name

Rounds corners of an element's outer border edge; equivalent of CSS border-radius

ClassName?

string

CSS class added to the cell. Colour, font and border properties on this object are still applied.


Quick Search API

QuickSearchApi

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

Clears Quick Search

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

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

Retrieves Quick Search section from Adaptable State

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

Retrieves current Quick Search text

gotoNextMatch()
returns

void

Goes to the next match for the current Quick Search text

Goes to the previous match for the current Quick Search text

Hides the floating Quick Search

Opens Settings Panel with Quick Search section selected and visible

Runs Quick Search using supplied text

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

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

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

Opens the Floating Quick Search