Fixed singleton event problem with multiple cells

pull/104/head
cagataycivici 2019-11-01 10:43:54 +03:00
parent 3fcc3cf58d
commit 7f71bfc47f
1 changed files with 14 additions and 3 deletions

View File

@ -140,10 +140,21 @@ export default {
}
},
completeEdit(event, type) {
let editEvent = {originalEvent: event, data: this.rowData, field: this.column.field, index: this.index, type: type, preventDefault: () => event.preventDefault()};
this.$emit('cell-edit-complete', editEvent);
let completeEvent = {
originalEvent: event,
data: this.rowData,
field: this.column.field,
index: this.index,
type: type,
defaultPrevented: false,
preventDefault: function() {
this.defaultPrevented = true;
}
};
if (!event.defaultPrevented) {
this.$emit('cell-edit-complete', completeEvent);
if (!completeEvent.defaultPrevented) {
this.switchCellToViewMode();
}
},