Browse Source

Merge pull request #9781 from nocodb/nc-copy-paste-fix

fix: copy rows is broken in infinite scroll
pull/9783/head
Anbarasu 2 months ago committed by GitHub
parent
commit
b66c5741e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      packages/nc-gui/composables/useMultiSelect/index.ts

5
packages/nc-gui/composables/useMultiSelect/index.ts

@ -321,8 +321,9 @@ export function useMultiSelect(
// Fetch all required chunks
await Promise.all([...chunksToFetch].map(fetchChunk))
// Make sure all data is loaded before copying
cprows = Array.from(unref(data as Map<number, Row>).values()).slice(selectedRange.start.row, selectedRange.end.row + 1) // slice the selected rows for copy
cprows = Array.from(unref(data as Map<number, Row>).entries())
.filter(([index]) => index >= selectedRange.start.row && index <= selectedRange.end.row)
.map(([, row]) => row)
}
const cpcols = unref(fields).slice(selectedRange.start.col, selectedRange.end.col + 1) // slice the selected cols for copy

Loading…
Cancel
Save