-
Notifications
You must be signed in to change notification settings - Fork 567
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
onMouseDown passthrough in ActionMenu and AnchoredOverlay #1217
Conversation
🦋 Changeset detectedLatest commit: 608a874 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primer-components/66KPbA67cAK1KYtgp8WicY6ejUjw |
/** | ||
* A callback that occurs when a user presses a mouse button over an element. | ||
*/ | ||
onMouseDown?: (event: React.MouseEvent) => unknown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would match the ActionMenu
and use onOverlayMouseDown
here since we still technically have a split between anchor and Overlay
in this component
ack, forgot to remove onMouseDown from anchored overlay, fixed in fc19bd3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, I think this will save us a lot of headaches down the road!
This PR provides a passthrough for onMouseDown events in
ActionMenu
toAnchoredOverlay
Also fills out some doc comments I realized were missing in
ActionMenu