Undo
Opened this issue · 1 comments
crosasga commented
Hi,
How can I do or some example related to undo or redo?
AnixPasBesoin commented
You can use the oldValue
param passed to the onUpdate
callback.
Example
myTable.MakeCellsEditable({
onUpdate: onMyTableUpdated,
...
});
function onMyTableUpdated(updatedCell, updatedRow, oldValue) {
if (newRow[0] > 5) {
alert('Bad value');
updatedCell.data(oldValue); // Undo
return false;
} else {
// Ajax for instance
}
}