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

[DropdownMenu][ContextMenu] Expose onCloseAutoFocus #456

Merged
merged 1 commit into from Feb 15, 2021

Conversation

benoitgrelard
Copy link
Collaborator

cc @vladmoroz, this should help you resolve your focus troubles once we release new versions.

@vladmoroz
Copy link

Thanks, Benoît! Is the plan to release once merged?

@benoitgrelard
Copy link
Collaborator Author

Thanks, Benoît! Is the plan to release once merged?

Yep 👍

@benoitgrelard benoitgrelard merged commit 6773ab9 into main Feb 15, 2021
@benoitgrelard benoitgrelard deleted the menu-expose-on-close-auto-focus branch February 15, 2021 10:32
@benoitgrelard
Copy link
Collaborator Author

@vladmoroz I'll ping you once we've released.

benoitgrelard added a commit that referenced this pull request Feb 15, 2021
[DropdownMenu][ContextMenu] Expose `onCloseAutoFocus` (#456)
@benoitgrelard
Copy link
Collaborator Author

Release is done:
image

The prop you’re after is onCloseAutoFocus on DropdownMenu.Content.
You’ll want to event.preventDefault in here when (and only when) you want to do custom focus management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants