diff --git a/frontend/src/shared/ui/components/KsDataGrid.vue b/frontend/src/shared/ui/components/KsDataGrid.vue index 4cd61bde..e5ef601a 100644 --- a/frontend/src/shared/ui/components/KsDataGrid.vue +++ b/frontend/src/shared/ui/components/KsDataGrid.vue @@ -117,12 +117,19 @@ function onCellFocused(event: CellFocusedEvent): void { if (event.column && event.rowIndex !== undefined) { const colDef = event.column.getColDef() if (colDef.editable) { - setTimeout(() => { + 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: event.column!.getColId() + colKey: focusedColId }) - }, 50) + } } } }