Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cdk/menu): not to close on outside click, add output event for outside click of menu, add output event for contextmenu #29872

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

naaajii
Copy link
Contributor

@naaajii naaajii commented Oct 13, 2024

feat(cdk/menu): not to close on outside click

this commit adds new input in menu trigger which allows users to disable closing menu on outside clicks


feat(cdk/menu): add output event for outside click of menu

this commit exposes an output which emits whenever the user clicks outside open menu


feat(cdk/menu): add output event for contextmenu

this commit exposes an output that emits whenever user triggers contextmenu event which contains clientX and clientY position respectively

this commit adds new input in menu trigger which allows users to disable closing menu on outside clicks

fixes angular#29072
this commit exposes an output which emits whenever the user clicks outside open menu

fixes angular#29072
this commit exposes an output that emits whenever user triggers `contextmenu` event which contains `clientX` and `clientY` position respectively

fixes angular#29072
@naaajii naaajii requested a review from a team as a code owner October 13, 2024 16:35
@naaajii naaajii requested review from crisbeto and amysorto and removed request for a team October 13, 2024 16:35
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Oct 13, 2024
@naaajii naaajii changed the title feat(cdk/menu): not to close on outside click, add output event for outside click of menu, add output event for contextmenu, feat(cdk/menu): not to close on outside click, add output event for outside click of menu, add output event for contextmenu Oct 13, 2024
@wagnermaciel wagnermaciel added the needs: discussion Further discussion with the team is needed before proceeding label Oct 14, 2024
readonly outsideClicked: EventEmitter<MouseEvent> = new EventEmitter();

/** Emits when the user triggers context menu */
readonly triggered: EventEmitter<{x: number; y: number}> = new EventEmitter();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the context behind exposing these APIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to include in PR description but it should close #29072.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discussed this with the team and the decision is that we are ok with exposing these APIs. There is still some questions on naming which @andrewseguin has the ability to make the final decision on

@wagnermaciel wagnermaciel requested a review from crisbeto October 16, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detected: feature PR contains a feature commit needs: discussion Further discussion with the team is needed before proceeding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants