You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: