RealGrid2 API
Interface
SearchCellEditor

SearchCellEditor

DropDownCellEditor with search functionality added

Signature:

export interface SearchCellEditor extends Omit<DropDownCellEditor, "listCallback" | "type">

Extends: Omit<DropDownCellEditor, "listCallback" | “type”>

Remarks

Inherits DropDownCellEditor.

[Superclass]

CellEditor - TextCellEditor - DropDownCellEditor

Example

//string type
column.editor = "search"
 
// object type
column.editor = {
      type: "search",
      values: ["VINET", "TOMSP", "VICTE"],
      labels: ['label1', 'label2', 'label3'],
      displayLabels: "valueLabel",
      textReadOnly: true;
      searchLength: 3
}

Properties

PropertyTypeDescription
initCountnumberNumber of items to show initially
moreItemCountnumberNumber of items to show when clicking the Show More button
moreTextstringText displayed on the Show More button
reInquerybooleanWhether to recheck when entering a key
searchDelaynumberTime until the search starts after the last key input is completed (ms, milliseconds)
searchLengthnumberMinimum number of characters required to start search
type'search'Cell editor type: Search
useCtrlEnterKeybooleanRegardless of searchLength and searchDelay, whether the onEditSearch event occurs immediately when the Ctrl+Enter key is pressed
useEnterKeybooleanWhether the onEditSearch event occurs immediately upon entering the Enter key regardless of searchLength and searchDelay

Properties Desc

initCount

Number of items to show initially

Type - number

Remarks:

If it is 0, everything is shown.


moreItemCount

Number of items to show when clicking the Show More button

Type - number


moreText

Text displayed on the Show More button

Type - string


reInquery

Whether to recheck when entering a key

Type - boolean


searchDelay

Time until the search starts after the last key input is completed (ms, milliseconds)

Type - number


searchLength

Minimum number of characters required to start a search

Type - number


type

Cell editor type: Search

Type - 'search'


useCtrlEnterKey

Regardless of searchLength and searchDelay, whether the onEditSearch event occurs immediately when the Ctrl+Enter key is pressed.

Type - boolean


useEnterKey

Whether the onEditSearch event occurs immediately upon entering the Enter key, regardless of searchLength and searchDelay.

Type - boolean

Remarks:

This only works if the list is empty.