You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import*asReactfrom'react'importMenufrom'material-ui-popup-state/HoverMenu'importMenuItemfrom'@material-ui/core/MenuItem'importButtonfrom'@material-ui/core/Button'import{usePopupState,bindHover,bindMenu,}from'material-ui-popup-state/hooks'constMenuPopupState=()=>{constpopupState=usePopupState({variant: 'popover',popupId: 'demoMenu'})return(<React.Fragment><Buttonvariant="contained"{...bindHover(popupState)}>
Hover to open Menu
</Button><Menu{...bindMenu(popupState)}getContentAnchorEl={null}anchorOrigin={{vertical: 'bottom',horizontal: 'left'}}transformOrigin={{vertical: 'top',horizontal: 'left'}}PaperProps={{style: {borderRadius: 2}}}// <--- This breaks the hover><MenuItemonClick={popupState.close}>Cake</MenuItem><MenuItemonClick={popupState.close}>Death</MenuItem></Menu></React.Fragment>)}exportdefaultMenuPopupState
The text was updated successfully, but these errors were encountered:
ivoiv
changed the title
transitionDuration={0} breaks Hover Menu
PaperProps breaks Hover Menu
Apr 22, 2021
Okay, sorry for the delay, I made a dumb mistake where passing your own PaperProps.style would blow away the pointerEvents: 'auto' style I was injecting. The CI build should comment on this issue once it releases the fix.
Sending
PaperProps
breaks the "hover transfer" for Hover Menu.When moving the mouse from the button to the menu it instantly closes.
I guess it's because the submitted PaperProps(at least the style) override Hover Menu's own, instead of them being combined.
Modified example from this example
The text was updated successfully, but these errors were encountered: