Merge pull request #7668 from rekonder/aj_SCI_10827

Save table content after removing row or columns [SCI-10827]
This commit is contained in:
ajugo 2024-06-28 13:40:40 +02:00 committed by GitHub
commit a2efba009a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -267,6 +267,16 @@ export default {
this.$emit('update', this.element, false, callback);
},
updateTableData() {
if (this.editingTable === false) return;
this.updatingTableData = true;
this.$nextTick(() => {
this.update(() => {
this.editingCell = false;
});
});
},
loadTableData() {
const container = this.$refs.hotTable;
const data = JSON.parse(this.element.attributes.orderable.contents);
@ -294,12 +304,13 @@ export default {
}
},
afterChange: () => {
if (this.editingTable === false) return;
this.updatingTableData = true;
this.$nextTick(() => {
this.update(() => this.editingCell = false);
});
this.updateTableData();
},
afterRemoveRow: () => {
this.updateTableData();
},
afterRemoveCol: () => {
this.updateTableData();
},
beforeKeyDown: (e) => {
if (e.keyCode === 27) { // esc