From b8945568786f9c92be40c59a1d4c0871d1d59563 Mon Sep 17 00:00:00 2001 From: KumJungMin Date: Sun, 22 Dec 2024 17:06:41 +0900 Subject: [PATCH] fix(editing): await reactive changes to access the latest cell data --- packages/primevue/src/datatable/BodyCell.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/primevue/src/datatable/BodyCell.vue b/packages/primevue/src/datatable/BodyCell.vue index 3bc542f9d..d66cc5200 100755 --- a/packages/primevue/src/datatable/BodyCell.vue +++ b/packages/primevue/src/datatable/BodyCell.vue @@ -401,20 +401,22 @@ export default { } } }, - moveToPreviousCell(event) { + async moveToPreviousCell(event) { let currentCell = this.findCell(event.target); let targetCell = this.findPreviousEditableColumn(currentCell); if (targetCell) { + await this.$nextTick(); invokeElementMethod(targetCell, 'click'); event.preventDefault(); } }, - moveToNextCell(event) { + async moveToNextCell(event) { let currentCell = this.findCell(event.target); let targetCell = this.findNextEditableColumn(currentCell); if (targetCell) { + await this.$nextTick(); invokeElementMethod(targetCell, 'click'); event.preventDefault(); }