Skip to content

Commit

Permalink
fix: clear async contain resize task before render #1593
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Apr 25, 2024
1 parent 5840de3 commit a8c4cd0
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions packages/vtable/src/scenegraph/scenegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,7 @@ export class Scenegraph {
* @return {*}
*/
updateNextFrame() {
// to do
// this.table.invalidate();
this.updateContainerSync();
this.resetAllSelectComponent();

this.stage.renderNextFrame();
Expand Down Expand Up @@ -1505,26 +1504,25 @@ export class Scenegraph {
if (!this._needUpdateContainer) {
this._needUpdateContainer = true;
setTimeout(() => {
this.updateContainerAttrWidthAndX();

this.updateTableSize();

this.component.updateScrollBar();
this.updateNextFrame();

this._needUpdateContainer = false;
this.updateContainerSync();
}, 0);
}
} else {
this.updateContainerAttrWidthAndX();

this.updateTableSize();

this.component.updateScrollBar();
this.updateNextFrame();
this._needUpdateContainer = true;
this.updateContainerSync();
}
}

this._needUpdateContainer = false;
updateContainerSync() {
if (!this._needUpdateContainer) {
return;
}
this.updateContainerAttrWidthAndX();
this.updateTableSize();
this.component.updateScrollBar();

this._needUpdateContainer = false;
this.updateNextFrame();
}

updateCellContentWhileResize(col: number, row: number) {
Expand Down

0 comments on commit a8c4cd0

Please sign in to comment.