fix(editing): await reactive changes to access the latest cell data

pull/6984/head
KumJungMin 2024-12-22 17:06:41 +09:00
parent bd0a270b1c
commit b894556878
1 changed files with 4 additions and 2 deletions

View File

@ -401,20 +401,22 @@ export default {
} }
} }
}, },
moveToPreviousCell(event) { async moveToPreviousCell(event) {
let currentCell = this.findCell(event.target); let currentCell = this.findCell(event.target);
let targetCell = this.findPreviousEditableColumn(currentCell); let targetCell = this.findPreviousEditableColumn(currentCell);
if (targetCell) { if (targetCell) {
await this.$nextTick();
invokeElementMethod(targetCell, 'click'); invokeElementMethod(targetCell, 'click');
event.preventDefault(); event.preventDefault();
} }
}, },
moveToNextCell(event) { async moveToNextCell(event) {
let currentCell = this.findCell(event.target); let currentCell = this.findCell(event.target);
let targetCell = this.findNextEditableColumn(currentCell); let targetCell = this.findNextEditableColumn(currentCell);
if (targetCell) { if (targetCell) {
await this.$nextTick();
invokeElementMethod(targetCell, 'click'); invokeElementMethod(targetCell, 'click');
event.preventDefault(); event.preventDefault();
} }