-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/menufeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix
Description
Feature Description
Current Behaviour
The directive CdkMenu
is used with combination of CdkContextMenuTriggerFor
. When user right-clicks (context-menu event), the menu gets opened and clicking on outside of the menu will close the menu.
New Feature Requested
It would be great if user can manually/programmatically open/close the menu. And also disable closing the menu clicking outside.
Possible Solutions
- Add a boolean input property
cdkContextMenuDisableCloseOnOutsideClick
- This will disable closing theCdkMenu
on outside click - Add an event emitter property
cdkContextMenuTriggered
- This will emit everytime user right-clicks (context-menu event) with the coordinates - Add an event emitter property
cdkContextMenuClickedOutside
- This will emit everytime user clicks outside of theCdkMenu
Use Case
This will allow users to handle animations with CdkMenu
if they want to apply on open/close.
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/menufeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
feat(cdk/menu): not to close on outside click
feat(cdk/menu): add output event for outside click of menu
feat(cdk/menu): add output event for `contextmenu`
contextmenu
#29872