-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MenuRoot] Remove wrong default value from docs #549
Conversation
Netlify deploy preview |
@@ -139,8 +139,6 @@ namespace MenuRoot { | |||
delay?: number; | |||
/** | |||
* Whether the menu popup opens when the trigger is hovered after the provided `delay`. | |||
* | |||
* @default nested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used to have such a prop in one of the previous implementation attempts and forgot to remove the @default
annotation. We can add in plain text that by default openOnHover
is set on nested menus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -139,6 +139,7 @@ namespace MenuRoot { | |||
delay?: number; | |||
/** | |||
* Whether the menu popup opens when the trigger is hovered after the provided `delay`. | |||
* By default, openOnHover is set to `true` for nested menus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* By default, openOnHover is set to `true` for nested menus. | |
* By default, `openOnHover` is set to `true` for nested menus. |
Thanks! |
I was looking at source code of Menu and docs, docs says default value of
openOnHover
prop isnested
butnested
value is not defined in code and even ifopenOnHover
prop is defined asnested
following code (see line 27) would be illogical asopenOnHoverProp
will always be true. hence i removed default prop asnested
from docs.base-ui/packages/mui-base/src/Menu/Root/MenuRoot.tsx
Lines 21 to 30 in 919d9ca
Before:
After
Preview:
https://deploy-preview-549--base-ui.netlify.app/base-ui/react-menu/components-api/#menu-root-props