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

[popover2] fix(showContextMenu): close on backdrop click #5980

Merged
merged 2 commits into from
Feb 28, 2023

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Feb 28, 2023

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

Previously, a user-supplied onClose would override our handleClose callback which is responsible for closing the uncontrolled ContextMenu2Popover.

Now, our handleClose callback takes precedence. We still take care to call the user's onClose() callback if provided.

Reviewers should focus on:

context menus opened with showContextMenu({ onClose: () => {/* */} }) should close when clicking on the popover backdrop.

Screenshot

@adidahiya
Copy link
Contributor Author

[popover2] fix(showContextMenu): close correctly when onClose is defined

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@adidahiya
Copy link
Contributor Author

add unit test

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@adidahiya adidahiya changed the title [popover2] fix(showContextMenu): close correctly when onClose is defined [popover2] fix(showContextMenu): close on backdrop click Feb 28, 2023
@adidahiya adidahiya merged commit 43beb7b into develop Feb 28, 2023
@adidahiya adidahiya deleted the ad/fix-showContextMenu-close branch February 28, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant