Skip to content

Mobile Popovers / Menu not opening in tray #5025

Answered by snowystinger
Cuttsy27 asked this question in Q&A
Discussion options

You must be logged in to vote

That's fairly advanced, I don't think we have any examples in the hooks pages with this yet because it'd take up so much space, but we'd definitely welcome it as an improvement as it is a fairly common thing to do.
You can look at our component's implementation to get an idea of how to do it. This is for Menu. Other components may handle it in slightly different ways.
https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/menu/src/MenuTrigger.tsx#L75
https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/overlays/src/Tray.tsx

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Cuttsy27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants