Search code examples
javascripthandsontable

handsontable - close custom editor programmatically


I want behavior which ESC button triggers by default, unfortunately that handler calls private methods so I cannot use it

case keyCodes.ESCAPE:
    if (_this.isEditorOpened()) {
      _this.closeEditorAndRestoreOriginalValue(ctrlDown);
    }
    event.preventDefault();
    break;

any ideas how can I close the editor?


Solution

  • destroyEditor(revertOriginal)
    Destroys current editor, renders and selects current cell.

    is what I need