Merge pull request #2749 from Ancient-Dragon/bugfix/fix-editor-callbacks-while-in-cell-edit-mode-v3

Check which edit mode when calling editor save callback and editor c…
pull/2757/head
Tuğçe Küçükoğlu 2022-07-04 12:01:42 +03:00 committed by GitHub
commit 47a3df5e2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -330,10 +330,19 @@ export default {
this.$emit('row-edit-init', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
},
editorSaveCallback(event) {
this.$emit('row-edit-save', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
if (this.editMode === 'row') {
this.$emit('row-edit-save', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
} else {
this.completeEdit(event, 'enter');
}
},
editorCancelCallback(event) {
this.$emit('row-edit-cancel', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
if (this.editMode === 'row') {
this.$emit('row-edit-cancel', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
} else {
this.switchCellToViewMode();
this.$emit('cell-edit-cancel', {originalEvent: event, data: this.rowData, field: this.field, index: this.rowIndex});
}
},
updateStickyPosition() {
if (this.columnProp('frozen')) {