From 0f147d70da43b3dbb6c120a0d642f5f6e67e86ed Mon Sep 17 00:00:00 2001 From: Mike Shevchenko Date: Thu, 18 Apr 2024 15:37:39 +0300 Subject: [PATCH] fix issue #12408 --- src/app/components/table/table.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 346db11b307..b9ad2f47f2e 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -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() {