Dear Sirs,
I got a problem with hands on table ver . 6.0.1
When I load initially data I do the following:
afterInit: function () {
this.selectCell(0, 0, 0, 0);
}
The cell focused has the following editor:
var sheetlyEditor = Handsontable.editors.TextEditor.prototype.extend();
sheetlyEditor.prototype.beginEditing = function (arg, event) {
var val = this.originalValue.value;
self.inEditor = true;
if (event) {
if (event.key && event.key !== 'F2' && event.key !== 'Enter' && event.key !== 'Dead') {
val = '';
}
}
Handsontable.editors.TextEditor.prototype.beginEditing.apply(this, [val]);
};
sheetlyEditor.prototype.saveValue = function (val) {
if (!self.inEditor)
return;
var _self = this;
if (_self.originalValue.value === val[0][0]) {
return;
}
var row = this.row;
var col = this.col;
var cellData = CloneObject(_self.originalValue);
var beforeCellData = CloneObject(_self.originalValue);
self.inEditor = false;
cellData.value = val[0][0];
self.AddToHistory([beforeCellData], [cellData]);
_self.instance.setDataAtCell(row, col, cellData, "edit");
//_self.cellProperties.readOnly = true;
//_self.instance.render();
self.RemoveRedoOption();
self.SendUpdate([cellData]);
};
when I press an arrow key on the keyboard the data in the cell is deleted. I noticed that saveValue = function (val) receives an empty string.
What am I doing wrong?