Skip to content

Commit

Permalink
fix(module:table): Fix column not fixed when apply virtual scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
BaoSkyFall committed Nov 8, 2023
1 parent fa2053d commit 47cfb94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/table/src/table/tr-measure.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ export class NzTrMeasureComponent implements AfterViewInit, OnDestroy {
// The `ResizeObserver` might be also patched through `zone.js/dist/zone-patch-resize-observer`,
// thus calling `ngZone.run` again will cause another change detection.
if (this.ngZone instanceof NgZone && NgZone.isInAngularZone()) {
if(!data.every(item=>!item))
this.listOfAutoWidth.next(data);
} else {
if(!data.every(item=>!item))
this.ngZone.run(() => this.listOfAutoWidth.next(data));
}
});
Expand Down

0 comments on commit 47cfb94

Please sign in to comment.