Open nick-keller opened 2 years ago
It happen at onChange
function
if (operation.type === 'CREATE') {
const count = operation.toRowIndex - operation.fromRowIndex
const addedRows = rows.slice(operation.fromRowIndex, operation.toRowIndex)
if (!operation.fromRowIndex) {
setRows([
...addedRows,
...rawRows.slice(operation.fromRowIndex),
])
return
}
setRows([
...rawRows.slice(0, operation.fromRowIndex),
...addedRows,
...rawRows.slice(operation.fromRowIndex),
])
}
Works fine for me.
Macbook: Firefox, Chrome
Discussed in https://github.com/Equify/react-datasheet-grid/discussions/144