AutocompleteEditor
Members
EDITOR_TYPE
AutocompleteEditor.EDITOR_TYPE
Returns the unique editor type identifier for the autocomplete editor.
query
autocompleteEditor.query : string
Query string to turn available values over.
rawChoices
autocompleteEditor.rawChoices : Array
Contains raw choices.
strippedChoices
autocompleteEditor.strippedChoices : Array<string>
Contains stripped choices.
Methods
close
autocompleteEditor.close()
Closes the editor.
createElements
autocompleteEditor.createElements()
Creates an editor’s elements and adds necessary CSS classnames.
discardEditor
autocompleteEditor.discardEditor(result)
Verifies result of validation or closes editor if user’s cancelled changes.
| Param | Type | Description |
|---|---|---|
| result | boolean undefined | If false and the cell using allowInvalid option, then an editor won’t be closed until validation is passed. |
getTargetEditorHeight
autocompleteEditor.getTargetEditorHeight() ⇒ number
Calculates the proposed/target editor height that should be set once the editor is opened. The method may be overwritten in the child class to provide a custom size logic.
getTargetEditorWidth
autocompleteEditor.getTargetEditorWidth() ⇒ number
Calculates the proposed/target editor width that should be set once the editor is opened. The method may be overwritten in the child class to provide a custom size logic.
getValue
autocompleteEditor.getValue() ⇒ string
Gets current value from editable element.
open
autocompleteEditor.open()
Opens the editor and adjust its size and internal Handsontable’s instance.
prepare
autocompleteEditor.prepare(row, col, prop, td, value, cellProperties)
Prepares editor’s metadata and configuration of the internal Handsontable’s instance.
| Param | Type | Description |
|---|---|---|
| row | number | The visual row index. |
| col | number | The visual column index. |
| prop | number string | The column property (passed when datasource is an array of objects). |
| td | HTMLTableCellElement | The rendered cell element. |
| value | * | The rendered value. |
| cellProperties | object | The cell meta object (see Core#getCellMeta). |
queryChoices
autocompleteEditor.queryChoices(query)
Prepares choices list based on applied argument.
| Param | Type | Description |
|---|---|---|
| query | string | The query. |
updateChoicesList
autocompleteEditor.updateChoicesList(choicesList)
Updates list of the possible completions to choose.
| Param | Type | Description |
|---|---|---|
| choicesList | Array | The choices list to process. |