The following request would make it technically possible to execute a redirect by clicking on the menu (onClick Handler for New-UDMenu) and to open New-UDMenuItem via mouseover.
We are currently in the process of building a new app menu in the app header / page header because we don't like the drawer or the normal navigation menu.
I would like to build a menu similar to the one on https://mui.com/.
To do this, I need the “Menu” component with the buttons used and the option to expand the menu on mouseover.
Also the onMouseLeave handler needs to be integrated. This can be done using MenuListProps={{ onMouseLeave: handleClose }}. Using onMouseLeave directly on Menu doesn't work because the Menu includes an overlay as part of the Menu leveraging Modal and the mouse never "leaves" the overlay.
I don't quite understand how exactly the integration on mui.com was built using native possibilities of their menu component, but I would like to at least basically recreate the functionality of having a menu in the header that I can open via mouseover. Of course, it would be nice if the “MenuItems” also looked like they do on mui.com.
I tried by using javascript directly to modify the component or creating the Element by myself using New-UDelement and changing the attributes but I would like it to be natively supported.
Side note: When a menu has no MenuItems, no OnClick Handler exists for the menu itself. But that would be another issue (if no children are needed, we use a button instead)...
Example
Here is a sample what we are using at the moment using the UDMenu in the HeaderContent (without any custom styling for the issue here). The ButtonGroup is only to have some content, not relevant.
Summary of the new feature / enhancement
Hi @adamdriscoll
(same for
New-UDListItem
#3674)The following request would make it technically possible to execute a redirect by clicking on the menu (onClick Handler for New-UDMenu) and to open New-UDMenuItem via mouseover.
We are currently in the process of building a new app menu in the app header / page header because we don't like the drawer or the normal navigation menu.
I would like to build a menu similar to the one on https://mui.com/.
To do this, I need the “Menu” component with the buttons used and the option to expand the menu on mouseover.
Also the
onMouseLeave
handler needs to be integrated. This can be done usingMenuListProps={{ onMouseLeave: handleClose }}
. UsingonMouseLeave
directly onMenu
doesn't work because the Menu includes an overlay as part of the Menu leveragingModal
and the mouse never "leaves" the overlay.I don't quite understand how exactly the integration on mui.com was built using native possibilities of their menu component, but I would like to at least basically recreate the functionality of having a menu in the header that I can open via mouseover. Of course, it would be nice if the “
MenuItems
” also looked like they do on mui.com.I tried by using javascript directly to modify the component or creating the Element by myself using New-UDelement and changing the attributes but I would like it to be natively supported.
Side note: When a menu has no MenuItems, no
OnClick
Handler exists for the menu itself. But that would be another issue (if no children are needed, we use a button instead)...Example
Here is a sample what we are using at the moment using the UDMenu in the HeaderContent (without any custom styling for the issue here). The ButtonGroup is only to have some content, not relevant.
https://github.com/user-attachments/assets/1de6ab0e-17b7-48ce-ac80-929427fdc43c
MUI menu from https://mui.com/
Thanks, René
Proposed technical implementation details (optional)
A basic example where
onMouseOver
andonMouseLeave
is included is this one: