Skip to content

Commit 42d3fd0

Browse files
kseamonandrewseguin
authored andcommitted
perf(column-resize): Further defer initial min/max column size application to reduce layout thrashing (#20238)
(cherry picked from commit 3ce4452)
1 parent c6b6432 commit 42d3fd0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/cdk-experimental/column-resize/resizable.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ export abstract class Resizable<HandleComponent extends ResizeOverlayHandle>
9494
}
9595

9696
ngAfterViewInit() {
97-
this._viewInitialized = true;
98-
9997
this._listenForRowHoverEvents();
10098
this._listenForResizeEvents();
10199
this._appendInlineHandle();
102-
this._applyMinWidthPx();
103-
this._applyMaxWidthPx();
100+
101+
this.styleScheduler.scheduleEnd(() => {
102+
this._viewInitialized = true;
103+
this._applyMinWidthPx();
104+
this._applyMaxWidthPx();
105+
});
104106
}
105107

106108
ngOnDestroy(): void {

0 commit comments

Comments
 (0)