From 56a5eb9391d8a9786974d64f66e62a9736de598c Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sun, 16 Aug 2026 20:50:59 +0900 Subject: [PATCH] fix(fe): KsDataGrid - Enter key uses Tab navigation (suggestedNextCell) Simplified navigateToNextCell to let Enter key use default AG Grid Tab behavior. Previous: Custom Enter navigation (next editable column only) New: Return suggestedNextCell for Enter, which is Tab's default behavior This makes Enter and Tab fully equivalent, consistent with user expectation. Co-Authored-By: Claude Haiku 4.5 --- .../src/shared/ui/components/KsDataGrid.vue | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/frontend/src/shared/ui/components/KsDataGrid.vue b/frontend/src/shared/ui/components/KsDataGrid.vue index ba1283f6..ac2f6b39 100644 --- a/frontend/src/shared/ui/components/KsDataGrid.vue +++ b/frontend/src/shared/ui/components/KsDataGrid.vue @@ -190,34 +190,10 @@ import type { NavigateToNextCellParams, CellPosition } from 'ag-grid-community' function navigateToNextCell(params: NavigateToNextCellParams): CellPosition | null { - const previousCell = params.previousCellPosition const suggestedNextCell = params.nextCellPosition if (params.key === 'Enter' || String(params.key) === '13') { - const allColumns = params.api.getAllGridColumns() - const editableCols = allColumns.filter(c => { - const colDef = c.getColDef() - return colDef.editable === true || typeof colDef.editable === 'function' - }) - - if (editableCols.length > 0) { - const currentColId = previousCell.column.getColId() - const currentIndex = editableCols.findIndex(c => c.getColId() === currentColId) - - if (currentIndex >= 0 && currentIndex < editableCols.length - 1) { - const nextCol = editableCols[currentIndex + 1] - const colId = nextCol.getColId() - setTimeout(() => { - params.api.startEditingCell({ rowIndex: previousCell.rowIndex, colKey: colId }) - }, 30) - return { - rowIndex: previousCell.rowIndex, - column: nextCol, - rowPinned: previousCell.rowPinned - } - } - return null - } + return suggestedNextCell } return suggestedNextCell