-
Notifications
You must be signed in to change notification settings - Fork 535
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
Action Menu correctly fires onAction callback after close #1228
Conversation
🦋 Changeset detectedLatest commit: bdedc4e 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/CgEuBA2jHhzNgEuNeTNUbvxmpe78 |
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.
Good catch!
"@primer/components": patch | ||
--- | ||
|
||
Action Menu correctly fires onAction callback after close. |
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.
Might want to update these release notes to reflect the fact that it will be called before close now
A couple of small fixes here that seem to be possibly from a botched rebase!
The after close behavior wasn't working quite as it should have been, because the
useEffect
hook had the wrong dependency (open vs combinedOpenState for the work to make ActionMenu optionally controlled) - further, the onAction callback was firing twice in the code when the component was operating as a controlled component due to both thependingActionRef
being populated and the call on L82.