The Menu component should spread the anchorOrigin properties to the Popover component to position the menu (docs)
The Menu component spreads the horizontal anchorOrigin property to it's Popover component, but doesn't seem to spread the vertical.
https://codesandbox.io/s/my4wvnj2jy
| Tech | Version |
|--------------|---------|
| Material-UI | v1.3.1 |
| React | latest |
| browser | chrome OS Version 67.0.3396.99 (Official Build) (32-bit) |
@jamstooks Don't miss the warning in the console:
Warning: Material-UI: you can not change the default
anchorOrigin.verticalvalue
when also providing thegetContentAnchorElproperty to the popover component.
Only use one of the two properties.
SetgetContentAnchorElto null or leftanchorOrigin.verticalunchanged.
Thanks, @oliviertassinari! I should have taken a peek there.
<Menu
id="simple-menu"
anchorEl={anchorEl}
getContentAnchorEl={null}
open={Boolean(anchorEl)}
onClose={this.handleClose}
anchorOrigin={this.state.origin}
>
...
</Menu>
...did the trick.
Most helpful comment
Thanks, @oliviertassinari! I should have taken a peek there.
...did the trick.