jcoreio / material-ui-popup-state

boilerplate for common Material-UI Menu, Popover and Popper use cases
https://jcoreio.github.io/material-ui-popup-state/
MIT License
452 stars 28 forks source link

Hover menu's position is different with example in material ui v4 #107

Closed wei-hong closed 2 years ago

wei-hong commented 2 years ago

As the title says, just like https://codesandbox.io/s/material-demo-forked-mp9nbb?file=/demo.js but I change material ui version to v5 that is correct

jedwards1211 commented 2 years ago

Add getContentAnchorEl={null} to the HoverMenu

Shouldn't be necessary, but it must be a bug in MUI v4, the console says

Material-UI: You can not change the default `anchorOrigin.vertical` value 
when also providing the `getContentAnchorEl` prop to the popover component.

Only use one of the two props.

Set `getContentAnchorEl` to `null | undefined` or leave `anchorOrigin.vertical` unchanged. 

But nothing is injecting non-null getContentAnchorEl