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
Is your feature request related to a problem? Please describe.
Currently it is possible to add menu items using the addNavMenuSection and addNavMenuItem function exposed by @vendure/admin-ui/core, but it is not possible to remove or override existing menu items. Internally the infrastructure is already in place to allow outside configuration of the entire nav menu. It just needs to be exposed.
Describe the solution you'd like
Two options:
Have addNavMenuSection and addNavMenuItemoverride any existing section or items if the id string matches an existing one.
Add new functions specifically for overriding.
But then how to remove menu items altogether? I guess that could be done by setting the requiresPermission property to some known invalid permission string. Then it would always be hidden in the admin UI.
Describe alternatives you've considered
I considered exposing a defineNavMenuSections(config: NavMenuSection[]) function which allows one to define the entire nav menu. The downside is that if you only want to override one or a few items, you end up having to duplicate the entire rest of the menu, which would be very inconvenient and verbose.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently it is possible to add menu items using the
addNavMenuSection
andaddNavMenuItem
function exposed by@vendure/admin-ui/core
, but it is not possible to remove or override existing menu items. Internally the infrastructure is already in place to allow outside configuration of the entire nav menu. It just needs to be exposed.Describe the solution you'd like
Two options:
addNavMenuSection
andaddNavMenuItem
override any existing section or items if theid
string matches an existing one.But then how to remove menu items altogether? I guess that could be done by setting the
requiresPermission
property to some known invalid permission string. Then it would always be hidden in the admin UI.Describe alternatives you've considered
I considered exposing a
defineNavMenuSections(config: NavMenuSection[])
function which allows one to define the entire nav menu. The downside is that if you only want to override one or a few items, you end up having to duplicate the entire rest of the menu, which would be very inconvenient and verbose.The text was updated successfully, but these errors were encountered: