|
|
@ -521,8 +521,15 @@ export function useMultiSelect( |
|
|
|
const rowsToPaste = unref(data).slice(activeCell.row, activeCell.row + pasteMatrixRows) |
|
|
|
const rowsToPaste = unref(data).slice(activeCell.row, activeCell.row + pasteMatrixRows) |
|
|
|
const propsToPaste: string[] = [] |
|
|
|
const propsToPaste: string[] = [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let pastedRows = 0 |
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < pasteMatrixRows; i++) { |
|
|
|
for (let i = 0; i < pasteMatrixRows; i++) { |
|
|
|
const pasteRow = rowsToPaste[i] |
|
|
|
const pasteRow = rowsToPaste[i] |
|
|
|
|
|
|
|
// TODO handle insert new row
|
|
|
|
|
|
|
|
if (pasteRow.rowMeta.new) break |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pastedRows++ |
|
|
|
|
|
|
|
|
|
|
|
for (let j = 0; j < pasteMatrixCols; j++) { |
|
|
|
for (let j = 0; j < pasteMatrixCols; j++) { |
|
|
|
const pasteCol = colsToPaste[j] |
|
|
|
const pasteCol = colsToPaste[j] |
|
|
|
|
|
|
|
|
|
|
@ -565,9 +572,11 @@ export function useMultiSelect( |
|
|
|
} |
|
|
|
} |
|
|
|
await bulkUpdateRows?.(rowsToPaste, propsToPaste) |
|
|
|
await bulkUpdateRows?.(rowsToPaste, propsToPaste) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (pastedRows > 0) { |
|
|
|
// highlight the pasted range
|
|
|
|
// highlight the pasted range
|
|
|
|
selectedRange.startRange({ row: activeCell.row, col: activeCell.col }) |
|
|
|
selectedRange.startRange({ row: activeCell.row, col: activeCell.col }) |
|
|
|
selectedRange.endRange({ row: activeCell.row + pasteMatrixRows - 1, col: activeCell.col + pasteMatrixCols - 1 }) |
|
|
|
selectedRange.endRange({ row: activeCell.row + pastedRows - 1, col: activeCell.col + pasteMatrixCols - 1 }) |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// handle belongs to column
|
|
|
|
// handle belongs to column
|
|
|
|
if ( |
|
|
|
if ( |
|
|
|