Skip to content

AutocompleteEditor

Members

EDITOR_TYPE

Source code

AutocompleteEditor.EDITOR_TYPE

Returns the unique editor type identifier for the autocomplete editor.

query

Source code

autocompleteEditor.query : string

Query string to turn available values over.

rawChoices

Source code

autocompleteEditor.rawChoices : Array

Contains raw choices.

strippedChoices

Source code

autocompleteEditor.strippedChoices : Array<string>

Contains stripped choices.

Methods

close

Source code

autocompleteEditor.close()

Closes the editor.

createElements

Source code

autocompleteEditor.createElements()

Creates an editor’s elements and adds necessary CSS classnames.

discardEditor

Source code

autocompleteEditor.discardEditor(result)

Verifies result of validation or closes editor if user’s cancelled changes.

ParamTypeDescription
resultboolean
undefined
If false and the cell using allowInvalid option, then an editor won’t be closed until validation is passed.

getTargetEditorHeight

Source code

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

Source code

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

Source code

autocompleteEditor.getValue() ⇒ string

Gets current value from editable element.

open

Source code

autocompleteEditor.open()

Opens the editor and adjust its size and internal Handsontable’s instance.

prepare

Source code

autocompleteEditor.prepare(row, col, prop, td, value, cellProperties)

Prepares editor’s metadata and configuration of the internal Handsontable’s instance.

ParamTypeDescription
rownumberThe visual row index.
colnumberThe visual column index.
propnumber
string
The column property (passed when datasource is an array of objects).
tdHTMLTableCellElementThe rendered cell element.
value*The rendered value.
cellPropertiesobjectThe cell meta object (see Core#getCellMeta).

queryChoices

Source code

autocompleteEditor.queryChoices(query)

Prepares choices list based on applied argument.

ParamTypeDescription
querystringThe query.

updateChoicesList

Source code

autocompleteEditor.updateChoicesList(choicesList)

Updates list of the possible completions to choose.

ParamTypeDescription
choicesListArrayThe choices list to process.