bindHover on menu
See original GitHub issuehey there
I’m trying to use bindHover
with bindMenu
but when mouse moves on sub menu list is closed…
am I doing something wrong ?
if not I think it’s good feature to add
{
popupState => (
<React.Fragment>
<MenuItem
className={classes.menuItem}
{...bindHover(popupState)}>
{item.title}
</MenuItem>
<Menu
anchorOrigin={{
vertical: "bottom",
horizontal: "right"
}}
className={classes.popover}
getContentAnchorEl={null}
TransitionComponent={Fade}
{...bindMenu(popupState)}
>
elevation={1}
>
{
item.subMenu.map((sub, j) =>
<NavLink to={sub.path} key={j}>
<MenuItem
className={classes.subMenu}
>
{sub.title}
</MenuItem>
</NavLink>
)}
</Menu>
</React.Fragment>
)
}
</PopupState>```
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (13 by maintainers)
Top Results From Across the Web
How to use the material-ui-popup-state.bindMenu function in ...
To help you get started, we've selected a few material-ui-popup-state.bindMenu examples, based on popular ways it is used in public projects.
Read more >material-ui-popup-state change button color - Stack Overflow
I am using material-ui-popup-state to create a material ui drop down menu In my Navbar.js i ... bindHover(popupState)} selected={popupState.
Read more >getcontentanchorel | The AI Search Engine You Control
hey there I'm trying to use bindHover with bindMenu but when mouse moves on sub menu list is closed… am I doing something...
Read more >How to overwrite the properties of richwidget dropdown menu
I tried overwriting the javascript of dropdown menu richwidget by ... that's not a menu, closes all menus $( document.body ).bind( "hover", ...
Read more >.hover() | jQuery API Documentation
A function to execute when the mouse pointer leaves the element. The .hover() method binds handlers for both mouseenter and mouseleave events. You...
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 FreeTop 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
Top GitHub Comments
@schemenauero btw, in this branch the hooks and render props APIs now share code under the hood and the hooks API supports
bindHover
💪You’re welcome!
To be perfectly clear, there is not just a backdrop, but also a modal root element enclosing the backdrop and the popover. It renders like this:
Popover hides the backdrop element, but there is currently no getting rid of the modal root element and mounting the Paper element by itself. So one has to make the modal root invisible to the mouse while keeping the paper visible to the mouse.
I figured out that the following styles on the
Popover
will accomplish what we need with hover interaction:I don’t want you guys to have to write these styles everywhere you use hover interaction though. I guess the best solution is to have this library export a
Popover
wrapped with these styles for convenience (as well as aMenu
).