Tabmenu set as scrollable show forward button when no needed #11415
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-faf8r7-4uc7os
Current behavior
If you have a tabmenu component set as
[scrollable]="true"
and the menu items fit in the screen, forward button is shown and does nothing when click it.Expected behavior
Forward and backward buttons should be only shown when necessary.
Minimal reproduction of the problem with instructions
Go to https://github-faf8r7-4uc7os.stackblitz.io. If you visit the page as desktop you see a forward button that does nothing. If you visit the page as mobile device forward button is useful and works correctly.
Possible solution
Call
updateButtonState
onngAfterViewInit
method.primeng/src/app/components/tabmenu/tabmenu.ts
Lines 163 to 170 in 420522e
What is the motivation / use case for changing the behavior?
Useless buttons that confuse the user.
Please tell us about your environment:
Ubuntu 20.04.4 LTS
Angular version: 5.X
13.3.2
PrimeNG version: 5.X
13.3.2
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
All browsers
Language: [all | TypeScript X.X | ES6/7 | ES5]
All
The text was updated successfully, but these errors were encountered: