1

I am trying to modify the handsontable doubleclick event to have additional functionality. My current code is as follows:

hot.view.wt.update('onCellDblClick', function (row,cell) {
    console.log("sucess");
});

This will sucessfully fire when a cell is double clicked on. However, it removes the current editing functionality of the cell.

Is there any way to update the on cell double click event whilst maintaining its current functionality?

Josh
  • 808
  • 1
  • 16
  • 35

1 Answers1

3

Alright I ended up figuring this one out myself. So I thought I'd post the answer in the chance it helps anyone in the future.

hot.view.wt.update('onCellDblClick', function (row,cell) {

    //Get editor and begin edit mode on current cell (maintain current double click functionality)
    var activeEditor = hot.getActiveEditor();
    activeEditor.beginEditing();

     //Do whatever you want...

});

Thanks to the answer in the following post for defining how to manipulate the editor.

When using Handsontable how to force a selected cell into edit mode?

Community
  • 1
  • 1
Josh
  • 808
  • 1
  • 16
  • 35