feat(CdkMenu/CdkContextMenuTriggerFor): Allow CdkMenu to be programmatically opened/closed #29072
Labels
area: cdk/menu
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Feature Description
Current Behaviour
The directive
CdkMenu
is used with combination ofCdkContextMenuTriggerFor
. 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
cdkContextMenuDisableCloseOnOutsideClick
- This will disable closing theCdkMenu
on outside clickcdkContextMenuTriggered
- This will emit everytime user right-clicks (context-menu event) with the coordinatescdkContextMenuClickedOutside
- 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.The text was updated successfully, but these errors were encountered: