-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
NbMenuItem is not applied 'active' styles if fragments are used in URL #875
Comments
I have same issue, Please someone advise. |
2 tasks
Blocked by #1041 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type
I'm submitting a ... (check one with "x")
Issue description
Current behavior:
It appears that 'active' state is set to the first NbMenuItem if the URL contains a fragment - #something. My understanding is that 'pathMatch' property is setting the first matching NbMenuItem in the menu as 'selected' on every URL change, so no matter what you chose in the menu - the top item will always get 'active' styles applied.
Expected behavior:
'active' styles are toggled per NbMenuItem selected
Steps to reproduce:
My sub-menu contains the items that link to the following:
/pages/report/f75287ea1ed31a56cd912a6c86333b9cd4bcb852#top
/pages/report/f75287ea1ed31a56cd912a6c86333b9cd4bcb852#findings
/pages/report/f75287ea1ed31a56cd912a6c86333b9cd4bcb852#conclusion
/pages/report/f75287ea1ed31a56cd912a6c86333b9cd4bcb852#metadata
Clicking on any of the items will update URL and do other business logic, but will not set the selected item styles to 'active'.
NOTE this problem does not exist in ngx-admin demo, but sub-menu there links to URLs that do not use fragments.
Related code:
Not sure how relevant this piece is, but that's how NbMenuItem is created in my code.
Other information:
Angular, Nebular
The text was updated successfully, but these errors were encountered: