Skip to content

Commit

Permalink
Fixed #15680 - TabView | forward/backward buttons not showing up when…
Browse files Browse the repository at this point in the history
… dynamic tab panels overflow
  • Loading branch information
mehmetcetin01140 committed Jul 9, 2024
1 parent e804cd6 commit 9f2dce0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/components/tabview/tabview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ export class TabView implements AfterContentInit, AfterViewChecked, OnDestroy, B
this.tabChangesSubscription = (this.tabPanels as QueryList<TabPanel>).changes.subscribe((_) => {
this.initTabs();
this.refreshButtonState();
this.callResizeObserver();
});

(this.templates as QueryList<PrimeTemplate>).forEach((item) => {
Expand All @@ -523,14 +524,18 @@ export class TabView implements AfterContentInit, AfterViewChecked, OnDestroy, B
});
}

ngAfterViewInit() {
callResizeObserver() {
if (isPlatformBrowser(this.platformId)) {
if (this.autoHideButtons) {
this.bindResizeObserver();
}
}
}

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"]');
Expand Down

0 comments on commit 9f2dce0

Please sign in to comment.