Skip to content

Commit

Permalink
Handle nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed Dec 26, 2024
1 parent 3162228 commit c638d57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/menu/root/useMenuRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export function useMenuRoot(parameters: useMenuRoot.Parameters): useMenuRoot.Ret
getFloatingProps(
mergeReactProps(externalProps, {
onMouseEnter() {
if (!openOnHover) {
if (!openOnHover || nested) {
setHoverEnabled(false);
}
},
Expand All @@ -242,7 +242,7 @@ export function useMenuRoot(parameters: useMenuRoot.Parameters): useMenuRoot.Ret
},
}),
),
[getFloatingProps, openOnHover],
[getFloatingProps, openOnHover, nested],
);

return React.useMemo(
Expand Down

0 comments on commit c638d57

Please sign in to comment.