Merge pull request #6520 from G-Chubinidze/gc_SCI_9189

CAPA - Large handson table on bottom of page [SCI-9189]
This commit is contained in:
Martin Artnik 2023-10-24 09:24:05 +02:00 committed by GitHub
commit ba8782b339
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,9 +146,10 @@
this.openNameModal(); this.openNameModal();
return; return;
} }
const { row = 0, col = 0 } = this.selectedCell || {};
this.editingTable = true; this.editingTable = true;
this.$nextTick(() => this.tableObject.selectCell(0,0)); this.$nextTick(() => this.tableObject.selectCell(row, col));
}, },
disableTableEdit() { disableTableEdit() {
this.editingTable = false; this.editingTable = false;
@ -254,6 +255,11 @@
afterUnlisten: () => { afterUnlisten: () => {
this.updatingTableData = true; this.updatingTableData = true;
setTimeout(this.updateTable, 100) // delay makes cancel button work setTimeout(this.updateTable, 100) // delay makes cancel button work
},
afterSelection: (r, c, r2, c2) => {
if (r === r2 && c === c2) {
this.selectedCell = { row: r, col: c };
}
} }
}); });
this.$nextTick(this.tableObject.render); this.$nextTick(this.tableObject.render);