From 823312fd263791854be3eb1812b9830c2b485d3b Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sun, 16 Aug 2026 20:56:09 +0900 Subject: [PATCH] fix(fe): KsDataGrid - remove onCellFocused to allow Enter key navigation Problem: onCellFocused was auto-starting edit mode on every focus, preventing AG Grid's native Enter-key navigation from working. Solution: Remove onCellFocused function and @cell-focused event handler. Now Enter key can properly navigate to next cell (Tab behavior). Co-Authored-By: Claude Haiku 4.5 --- .../src/shared/ui/components/KsDataGrid.vue | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/frontend/src/shared/ui/components/KsDataGrid.vue b/frontend/src/shared/ui/components/KsDataGrid.vue index cebb3227..cc47aae8 100644 --- a/frontend/src/shared/ui/components/KsDataGrid.vue +++ b/frontend/src/shared/ui/components/KsDataGrid.vue @@ -20,8 +20,7 @@ import { type ColDef, type RowClickedEvent, type CellValueChangedEvent, - type RowClassParams, - type CellFocusedEvent + type RowClassParams } from 'ag-grid-community' import type { UiGridColumn } from '../adapter/contracts' @@ -113,26 +112,6 @@ function onCellValueChanged(event: CellValueChangedEvent): void { } } -function onCellFocused(event: CellFocusedEvent): void { - if (event.column && event.rowIndex !== undefined) { - const colDef = event.column.getColDef() - if (colDef.editable) { - const currentEditingCell = event.api.getEditingCell() - const focusedColId = event.column.getColId() - - const isSameCell = currentEditingCell && - currentEditingCell.rowIndex === event.rowIndex && - currentEditingCell.column?.getColId() === focusedColId - - if (!isSameCell) { - event.api.startEditingCell({ - rowIndex: event.rowIndex, - colKey: focusedColId - }) - } - } - } -} function onSortChanged(params: { api: { redrawRows: () => void; refreshCells: (options: { force: boolean }) => void } }): void { params.api.redrawRows() @@ -208,7 +187,6 @@ defineExpose({ focusRow, redrawRows, gridApi }) @sort-changed="onSortChanged" @row-clicked="onRowClicked" @cell-value-changed="onCellValueChanged" - @cell-focused="onCellFocused" />