diff --git a/frontend/src/shared/ui/components/KsDataGrid.vue b/frontend/src/shared/ui/components/KsDataGrid.vue index cc47aae8..21748a0e 100644 --- a/frontend/src/shared/ui/components/KsDataGrid.vue +++ b/frontend/src/shared/ui/components/KsDataGrid.vue @@ -112,7 +112,6 @@ function onCellValueChanged(event: CellValueChangedEvent): void { } } - function onSortChanged(params: { api: { redrawRows: () => void; refreshCells: (options: { force: boolean }) => void } }): void { params.api.redrawRows() } @@ -139,25 +138,15 @@ function onGridReady(params: GridReadyEvent): void { params.api.sizeColumnsToFit() } - - - function focusRow(rowIndex: number, colKey?: string): void { if (!gridApi.value) return const col = colKey || (props.columns[0]?.field ?? '') - const attempt = () => { - if (!gridApi.value) return - gridApi.value.ensureIndexVisible(rowIndex) - if (col) { - gridApi.value.setFocusedCell(rowIndex, col) - gridApi.value.startEditingCell({ rowIndex, colKey: col }) - } + gridApi.value.ensureIndexVisible(rowIndex) + if (col) { + gridApi.value.setFocusedCell(rowIndex, col) + gridApi.value.startEditingCell({ rowIndex, colKey: col }) } - - attempt() - setTimeout(attempt, 50) - setTimeout(attempt, 150) } function redrawRows(): void {