fix datagrid insert

This commit is contained in:
Jan Prochazka
2021-04-05 13:30:07 +02:00
parent a23ff752a3
commit 0459ca886b

View File

@@ -346,7 +346,7 @@
grider.endUpdate(); grider.endUpdate();
} }
export function insertNewRow() { export async function insertNewRow() {
if (grider.canInsert) { if (grider.canInsert) {
const rowIndex = grider.insertRow(); const rowIndex = grider.insertRow();
const cell = [rowIndex, (currentCell && currentCell[1]) || 0]; const cell = [rowIndex, (currentCell && currentCell[1]) || 0];
@@ -354,6 +354,7 @@
currentCell = cell; currentCell = cell;
// @ts-ignore // @ts-ignore
selectedCells = [cell]; selectedCells = [cell];
await tick();
scrollIntoView(cell); scrollIntoView(cell);
} }
} }