CAPA - Large handson table on bottom of page

This commit is contained in:
Giga Chubinidze 2023-10-24 11:12:07 +04:00
parent 51a2b3902b
commit 8041389e2a

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);