diff --git a/src/app/components/tabview/tabview.ts b/src/app/components/tabview/tabview.ts index 7c3847e56a6..fb522e4269a 100755 --- a/src/app/components/tabview/tabview.ts +++ b/src/app/components/tabview/tabview.ts @@ -508,6 +508,7 @@ export class TabView implements AfterContentInit, AfterViewChecked, OnDestroy, B this.tabChangesSubscription = (this.tabPanels as QueryList).changes.subscribe((_) => { this.initTabs(); this.refreshButtonState(); + this.callResizeObserver(); }); (this.templates as QueryList).forEach((item) => { @@ -523,7 +524,7 @@ export class TabView implements AfterContentInit, AfterViewChecked, OnDestroy, B }); } - ngAfterViewInit() { + callResizeObserver() { if (isPlatformBrowser(this.platformId)) { if (this.autoHideButtons) { this.bindResizeObserver(); @@ -531,6 +532,10 @@ export class TabView implements AfterContentInit, AfterViewChecked, OnDestroy, B } } + ngAfterViewInit() { + this.callResizeObserver(); + } + bindResizeObserver() { this.container = DomHandler.findSingle(this.el.nativeElement, '[data-pc-section="navcontent"]'); this.list = DomHandler.findSingle(this.el.nativeElement, '[data-pc-section="nav"]');