Skip to content

Commit

Permalink
Merge pull request #15986 from primefaces/issue-15680
Browse files Browse the repository at this point in the history
Fixed #15680 - TabView | forward/backward buttons not showing up when…
  • Loading branch information
cetincakiroglu authored Jul 11, 2024
2 parents d6f7e51 + 9f2dce0 commit 08860d0
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 @@ -498,6 +498,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 @@ -513,14 +514,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 08860d0

Please sign in to comment.