Skip to content

Commit

Permalink
feat: Copy a range of cells and paste it into another range, extendin…
Browse files Browse the repository at this point in the history
…g the target range if it is too small - optimize. silevis#280
  • Loading branch information
qiufeihong2018 committed Dec 19, 2023
1 parent d2f91e7 commit ddadc01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/Functions/expandGridIfNeeded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const expandGridIfNeeded = (
for (let i = 0; i < columnsToAdd; i++) {
cellMatrix.columns.push({
...prefix,
columnId: `col-${currentColumnCount + i}`,
columnId: currentColumnCount + i,
idx: currentColumnCount + i,
left: prefix.right,
right: prefix.right + prefix.width || CellMatrix.DEFAULT_COLUMN_WIDTH,
Expand All @@ -50,8 +50,8 @@ export const expandGridIfNeeded = (
for (let i = 0; i < rowsToAdd; i++) {
cellMatrix.rows.push({
...prefix,
rowId: currentRowCount + i,
idx: currentRowCount + i,
rowId: `row-${currentRowCount + i}`,
top: prefix.bottom,
bottom: prefix.bottom + prefix.height || CellMatrix.DEFAULT_ROW_HEIGHT,
});
Expand Down

0 comments on commit ddadc01

Please sign in to comment.