Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GridSearchService

Search service remembers the search state and the location of the last match, for incremental searching. Search service is also responsible of providing a cell renderer function to set the background color of cells matching the search text.

Hierarchy

  • GridSearchService

Index

Constructors

constructor

Properties

Private _column

_column: number

Private _grid

_grid: DataGrid

Private _looping

_looping: boolean = true

Private _query

_query: RegExp | null

Private _row

_row: number

Accessors

query

  • get query(): RegExp

Methods

Private _wrapRows

  • _wrapRows(reverse?: boolean): void
  • Wrap indices if needed to just before the start or just after the end.

    Parameters

    • Default value reverse: boolean = false

    Returns void

cellBackgroundColorRendererFunc

  • cellBackgroundColorRendererFunc(config: TextRenderConfig): CellRenderer.ConfigFunc<string>
  • Returns a cellrenderer config function to render each cell background. If cell match, background is matchBackgroundColor, if it's the current match, background is currentMatchBackgroundColor.

    Parameters

    Returns CellRenderer.ConfigFunc<string>

clear

  • clear(): void

find

  • find(query: RegExp, reverse?: boolean): boolean
  • incrementally look for searchText.

    Parameters

    • query: RegExp
    • Default value reverse: boolean = false

    Returns boolean

Generated using TypeDoc