Is your feature request related to a problem? Please describe.
Right now (with the Angular 18 update) all menu items are global. When a component with a menu is loaded in, it will always show up in the context menu.
Some components could have some context menu items that the parent should not have. Some components have menu items that should show up everywhere.
There should be a way to limit options from showing up in the context menu wherever you click.
Describe the solution you'd like
Add global: true | undefined to the base menu item.
Deactivate all menus on document:click and document:contextmenu.
Activate menus on click and contextmenu in the ContextDirective.
Filter the menus on active menus before merging them.
Describe alternatives you've considered
Add local: true | undefined to the base menu item
Deactivate all menus on document:click and document:contextmenu.
Activate menus on click and contextmenu in the ContextDirective.
Don't add items with local = true without an active menu when merging menus.
Additional context
The alternative seems to be a bit more work, but I'm not sure which would be the best solution.
I'm also not sure how to handle hotkeys in one of these solutions. Probably pause any inactive menu items' hotkeys.
Is your feature request related to a problem? Please describe. Right now (with the Angular 18 update) all menu items are global. When a component with a menu is loaded in, it will always show up in the context menu.
Some components could have some context menu items that the parent should not have. Some components have menu items that should show up everywhere.
There should be a way to limit options from showing up in the context menu wherever you click.
Describe the solution you'd like
global: true | undefined
to the base menu item.document:click
anddocument:contextmenu
.click
andcontextmenu
in theContextDirective
.Describe alternatives you've considered
local: true | undefined
to the base menu itemdocument:click
anddocument:contextmenu
.click
andcontextmenu
in theContextDirective
.local = true
without an active menu when merging menus.Additional context The alternative seems to be a bit more work, but I'm not sure which would be the best solution.
I'm also not sure how to handle hotkeys in one of these solutions. Probably pause any inactive menu items' hotkeys.