diff --git a/frontend/src/shared/ui/components/KsDataGrid.vue b/frontend/src/shared/ui/components/KsDataGrid.vue index 7db398e5..be73b532 100644 --- a/frontend/src/shared/ui/components/KsDataGrid.vue +++ b/frontend/src/shared/ui/components/KsDataGrid.vue @@ -158,13 +158,16 @@ function focusRow(rowIndex: number, colKey?: string): void { const col = colKey || (props.columns[0]?.field ?? '') gridApi.value.ensureIndexVisible(rowIndex) - gridApi.value.setFocusedCell(rowIndex, col) - if (col) { - setTimeout(() => { - gridApi.value?.startEditingCell({ rowIndex, colKey: col }) - }, 0) + const attempt = () => { + if (!gridApi.value) return + gridApi.value.setFocusedCell(rowIndex, col) + gridApi.value.startEditingCell({ rowIndex, colKey: col }) } + + attempt() + setTimeout(attempt, 10) + setTimeout(attempt, 50) } function redrawRows(): void {