Cap selected cell rows at 50

This commit is contained in:
Andrew Kingston 2024-06-26 14:48:30 +01:00
parent c5a2f9ce7d
commit acaac0c190
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View File

@ -35,6 +35,7 @@
progressPercentage = progress * 100 progressPercentage = progress * 100
} }
) )
await sleep(duration)
// Select new cells to highlight them // Select new cells to highlight them
if (newRows.length) { if (newRows.length) {
@ -46,7 +47,6 @@
const endCellId = getCellID(lastRow._id, lastCol.name) const endCellId = getCellID(lastRow._id, lastCol.name)
selectedCells.actions.selectRange(startCellId, endCellId) selectedCells.actions.selectRange(startCellId, endCellId)
} }
await sleep(duration)
processing = false processing = false
} }

View File

@ -122,7 +122,10 @@ export const deriveStores = context => {
return [] return []
} }
const lowerRowIndex = Math.min(sourceRowIndex, targetRowIndex) const lowerRowIndex = Math.min(sourceRowIndex, targetRowIndex)
const upperRowIndex = Math.max(sourceRowIndex, targetRowIndex) let upperRowIndex = Math.max(sourceRowIndex, targetRowIndex)
// Cap rows at 50
upperRowIndex = Math.min(upperRowIndex, lowerRowIndex + 49)
// Column indices // Column indices
const sourceColIndex = $columnLookupMap[sourceInfo.field].__idx const sourceColIndex = $columnLookupMap[sourceInfo.field].__idx