diff --git a/frontend/src/shared/ui/components/KsDataGrid.vue b/frontend/src/shared/ui/components/KsDataGrid.vue index a80204ca..7db398e5 100644 --- a/frontend/src/shared/ui/components/KsDataGrid.vue +++ b/frontend/src/shared/ui/components/KsDataGrid.vue @@ -117,6 +117,13 @@ function onCellKeyDown(event: any): void { event.event.preventDefault() event.api.stopEditing(false) event.api.tabToNextCell(false) + + setTimeout(() => { + const focusedCell = event.api.getFocusedCell() + if (focusedCell && focusedCell.rowIndex !== null) { + event.api.startEditingCell({ rowIndex: focusedCell.rowIndex, colKey: focusedCell.column.getColId() }) + } + }, 0) } } @@ -152,8 +159,11 @@ function focusRow(rowIndex: number, colKey?: string): void { gridApi.value.ensureIndexVisible(rowIndex) gridApi.value.setFocusedCell(rowIndex, col) + if (col) { - gridApi.value.startEditingCell({ rowIndex, colKey: col }) + setTimeout(() => { + gridApi.value?.startEditingCell({ rowIndex, colKey: col }) + }, 0) } }