Skip to content

Commit

Permalink
Merge pull request #15302 from Lolibai/master
Browse files Browse the repository at this point in the history
Fix Issue with frozen columns #12408
  • Loading branch information
cetincakiroglu authored Apr 26, 2024
2 parents cae16c7 + 0f147d7 commit 421c2fb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3305,11 +3305,22 @@ export class FrozenColumn implements AfterViewInit {
ngAfterViewInit() {
this.zone.runOutsideAngular(() => {
setTimeout(() => {
this.updateStickyPosition();
this.recalculateColumns();
}, 1000);
});
}

@HostListener('window:resize', ['$event'])
recalculateColumns() {
const siblings = DomHandler.siblings(this.el.nativeElement);
const index = DomHandler.index(this.el.nativeElement);
const time = (siblings.length - index + 1) * 50;

setTimeout(() => {
this.updateStickyPosition();
}, time);
}

_frozen: boolean = true;

updateStickyPosition() {
Expand Down

0 comments on commit 421c2fb

Please sign in to comment.