Closed ruchiaa closed 1 year ago
Here is a sandbox example for your use case.
It uses both useClick
and useHover
from the package, and a boolean toggle to conditionally apply props to the ControlledMenu
.
For submenu, it has an openTrigger
prop which controls whether the menu is triggered by click or hover events.
That works! Thank you!
I want to use click to trigger the ControlledMenu and its SubMenus if some condition is true, and hover otherwise. How can I achieve this?