SidebarNavHelper.isActive should check child items for dropdowns
See original GitHub issueHi,
I have a case when urls of child items do not start with the same path as parent’s url. In this scenario item selection is not working as expected. So, is it possible to change SidebarNavHelper.isActive to something like this:
public isActive(router, item) {
const url = item.url;
if (this.itemType(item) === 'dropdown') {
if (url === '' || url === '#') {
return item.children.some((childItem: any) => this.isActive(router, childItem));
} else {
return router.isActive(url, false);
}
} else {
return router.isActive(url, true);
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
JQuery dropdown menu, how to show child-items when ...
If you want jQuery to show the sub navigation for the current item you can check for the class on the sub navigations...
Read more >Dropdowns
They're made interactive with the included Bootstrap dropdown JavaScript ... ARIA menus can only contain menu items, checkbox menu items, radio button menu ......
Read more >Dropdown
dropdown -item each single item of the dropdown, which can either be a a or a div; dropdown-divider a horizontal line to separate...
Read more >Dropdown | Components
Now you can optionally create <button> elements in your dropdowns by using the <b-dropdown-item-button> sub-component. <b-dropdown-item-button> does not ...
Read more >"Find Children" "Select Item" from a drop down list - Help
Hello Everybody, Currently I'm trying to download data from “Agriculture Marketing” this website. Where first I have to select commodity ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@WolfgangVonL @kafo85
v2.7.4 adds
SidebarNavHelper
to the public-api surface, you can safely:@WolfgangVonL
This feature will be available as an option in the upcoming CoreUI v3 for Angular.