[Menu] Vertical anchoring of Popover
See original GitHub issueProblem description
If you set the vertical value of the anchorOrigin prop for the Popover component to anything other than 0 or center, you do not get the desired result. I believe this line is the culprit:
Looks like the expressions of the ternary operator are reversed.
Steps to reproduce
Create a Popover or other component that uses a Popover (such as a Menu) and set a anchorOrigin: vertical value of something other than ‘center’ or 0.
<Popover anchorOrigin={{vertical: 'bottom'}} ... />
Versions
- Material-UI: v1.0.0-beta.6
- React: 15.6.1
- Browser: Any
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:22 (11 by maintainers)
Top Results From Across the Web
[Menu] Vertical anchoring of Popover #7961 - mui/material-ui
Create a Popover or other component that uses a Popover (such as a Menu) and set a anchorOrigin: vertical value of something other...
Read more >Material UI: How to change a Menu's MenuItems anchor to ...
Material UI: How to change a Menu's MenuItems anchor to popover below instead of over. If you're here, you're probably using Material UI...
Read more >How to set Anchor to Popover in Material-UI - Stack Overflow
The Popover should be in the top-bottom corner of the button. With ref, it appears in the middle of the screen... – Jöcker....
Read more >anchororigin={{vertical: 'bottom'}} - You.com - You.com
The Menu component spreads the horizontal anchorOrigin property to it's Popover component, but doesn't seem to spread the vertical . Steps to Reproduce...
Read more >Popover API - Material UI - MUI
Name Type Default
open * bool false
action ref
anchorEl HTML element | func
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Add
getContentAnchorEl={null}
and you should be good.That is correct, it is mentioned there. But if I am looking correctly, that page contains no explanation or warning about the necessity to override it to
null
when usinganchorOrigin
prop with a value forvertical
.