Fixed singleton event problem with multiple cells
parent
3fcc3cf58d
commit
7f71bfc47f
|
@ -140,10 +140,21 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
completeEdit(event, type) {
|
completeEdit(event, type) {
|
||||||
let editEvent = {originalEvent: event, data: this.rowData, field: this.column.field, index: this.index, type: type, preventDefault: () => event.preventDefault()};
|
let completeEvent = {
|
||||||
this.$emit('cell-edit-complete', editEvent);
|
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();
|
this.switchCellToViewMode();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue