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 f2517a6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/table/src/table/tr-measure.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,15 @@ 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()) {
this.listOfAutoWidth.next(data);
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 f2517a6

Please sign in to comment.