-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabmenu highlights wrong menuitem when has routerLinkActiveOptions set as exact #11410
Comments
This issue is still present in primeNG 14.0.2. |
14.1.2 still the same |
Hi, So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Best Regards, |
@Jonnyprof @mertsincan I think this isssue still exist https://github.com/primefaces/primeng/blob/master/src/app/components/tabmenu/tabmenu.ts |
This issue is still happening, because the |
@mertsincan please reopen it, I can't |
I also think that isActive method should include queryParams in its check |
Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨ |
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-faf8r7
Current behavior
When the p-tabMenu contains a model attribute that refers to an array containing items with a routerLink and one of them is exact route, this one is always highlighted.
Expected behavior
Only the menu item corresponding with the route should be highlighted.
Minimal reproduction of the problem with instructions
Go to stackblitz and navigate between pages. Menu item "home" is always highlighted (with default css theme).
Cause of the problem
Last parameter of
this.router.isActive
isexact
and isfalse
. It should betrue
to get "exact" option properly..primeng/src/app/components/tabmenu/tabmenu.ts
Lines 120 to 128 in ab48dda
What is the motivation / use case for changing the behavior?
Tabmenu works wrong 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: