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

  • Parameters

    • grid: DataGrid

    Returns GridSearchService

Properties

Private _changed

_changed: any

Private _column

_column: any

Private _grid

_grid: any

Private _looping

_looping: any

Private _query

_query: any

Private _row

_row: any

Private _wrapRows

_wrapRows: any

Wrap indices if needed to just before the start or just after the end.

Accessors

changed

  • A signal fired when the grid changes.

    Returns ISignal<GridSearchService, void>

query

  • get query(): RegExp | null
  • Returns RegExp | null

Methods

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
  • Clear the search.

    Returns void

find

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

    Parameters

    • query: RegExp
    • Optional reverse: boolean

    Returns boolean

Generated using TypeDoc