Skip to content

Commit

Permalink
Merge pull request #2819 from VisActor/2804-bug-selectRange-after-resize
Browse files Browse the repository at this point in the history
2804 bug select range after resize
  • Loading branch information
fangsmile authored Nov 14, 2024
2 parents 44f86f8 + c2cebe1 commit a7be628
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: when after select range not exist #2804\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
7 changes: 1 addition & 6 deletions packages/vtable/src/scenegraph/layout/frozen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@ export function resetFrozen(scene: Scenegraph) {
}

updateReactComponentContainer(scene);

scene.deleteAllSelectBorder();
scene.table.stateManager.select.ranges.forEach(range => {
scene.updateCellSelectBorder(range);
});

scene.recreateAllSelectRangeComponents();
// scene.frozenColCount = scene.rowHeaderGroup.childrenCount;
scene.frozenColCount = scene.table.frozenColCount;
scene.frozenRowCount = scene.colHeaderGroup.firstChild?.childrenCount ?? 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/src/scenegraph/scenegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,8 @@ export class Scenegraph {
deleteAllSelectBorder(this);
this.table.stateManager.select.ranges.forEach((cellRange: CellRange) => {
updateCellSelectBorder(this, cellRange);
moveSelectingRangeComponentsToSelectedRangeComponents(this);
});
moveSelectingRangeComponentsToSelectedRangeComponents(this);
}
/**
* @description: 列宽调整结果更新列宽
Expand Down

0 comments on commit a7be628

Please sign in to comment.