Browse Source

fix: Fixed multi copy paste for long text

pull/7175/head
Muhammed Mustafa 9 months ago
parent
commit
41a9d03bb8
  1. 9
      packages/nc-gui/composables/useMultiSelect/index.ts

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

@ -752,11 +752,13 @@ export function useMultiSelect(
const clipboardMatrix = parsedClipboard.data as string[][]
const pasteMatrixRows = clipboardMatrix.length
const selectionRowCount = selectedRange.end.row - selectedRange.start.row + 1
const pasteMatrixRows = selectionRowCount
const pasteMatrixCols = clipboardMatrix[0].length
const colsToPaste = unref(fields).slice(activeCell.col, activeCell.col + pasteMatrixCols)
const rowsToPaste = unref(data).slice(activeCell.row, activeCell.row + pasteMatrixRows)
const rowsToPaste = unref(data).slice(activeCell.row, activeCell.row + selectionRowCount)
const propsToPaste: string[] = []
let pastedRows = 0
@ -780,7 +782,8 @@ export function useMultiSelect(
const pasteValue = convertCellData(
{
value: clipboardMatrix[i][j],
// Repeat the clipboard data array if the matrix is smaller than the selection
value: clipboardMatrix[i % clipboardMatrix.length][j],
to: pasteCol.uidt as UITypes,
column: pasteCol,
appInfo: unref(appInfo),

Loading…
Cancel
Save