Tabmenu with routerLink items doesn't show offscreen item when reloaded #11411
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-qpm6nh
Current behavior
If you have a tabmenu component set as
[scrollable]="true"
and go to a "hidden" item scrolling. When you refresh the page the selected item is not shown, you have to scroll and you don't know the current page.Expected behavior
You should see the selected item when reload page.
Minimal reproduction of the problem with instructions
Set your browser as mobile device and go to https://github-faf8r7-qpm6nh.stackblitz.io/about. This selects correctly the about menuItem, but is hidden by the scrolling.
Possible solution
Call
updateScrollBar
onngAfterViewInit
method.primeng/src/app/components/tabmenu/tabmenu.ts
Lines 173 to 176 in ab48dda
What is the motivation / use case for changing the behavior?
Tabmenu doesn't show current page and it's confusing.
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: