diff --git a/packages/frontend-core/src/components/grid/controls/BulkDuplicationHandler.svelte b/packages/frontend-core/src/components/grid/controls/BulkDuplicationHandler.svelte index c63b247794..a300843185 100644 --- a/packages/frontend-core/src/components/grid/controls/BulkDuplicationHandler.svelte +++ b/packages/frontend-core/src/components/grid/controls/BulkDuplicationHandler.svelte @@ -35,6 +35,7 @@ progressPercentage = progress * 100 } ) + await sleep(duration) // Select new cells to highlight them if (newRows.length) { @@ -46,7 +47,6 @@ const endCellId = getCellID(lastRow._id, lastCol.name) selectedCells.actions.selectRange(startCellId, endCellId) } - await sleep(duration) processing = false } diff --git a/packages/frontend-core/src/components/grid/stores/ui.js b/packages/frontend-core/src/components/grid/stores/ui.js index bdbfe82e83..7f39116b05 100644 --- a/packages/frontend-core/src/components/grid/stores/ui.js +++ b/packages/frontend-core/src/components/grid/stores/ui.js @@ -122,7 +122,10 @@ export const deriveStores = context => { return [] } 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 const sourceColIndex = $columnLookupMap[sourceInfo.field].__idx