-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[base] Do not merge internal ownerState
with ownerState
from props
#36599
Conversation
ownerState
with ownerState
from props
Netlify deploy previewhttps://deploy-preview-36599--material-ui.netlify.app/ @mui/joy: parsed: +0.04% , gzip: +0.13% Bundle size report |
5619658
to
6c3da4c
Compare
6449324
to
f71dc53
Compare
packages/mui-joy/src/Menu/Menu.tsx
Outdated
slots: { | ||
root: component || 'ul', | ||
}, |
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.
Can you add a test to ensure that the Menu
produces ul
?
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.
Addressed in 36231c4
slots: { | ||
root: { | ||
expectedClassName: classes.root, | ||
}, | ||
input: { | ||
testWithComponent: React.forwardRef<HTMLInputElement>((props, ref) => ( | ||
<input ref={ref} {...props} data-testid="custom" /> | ||
)), | ||
testWithElement: 'input', | ||
expectedClassName: classes.input, | ||
}, | ||
listbox: { | ||
testWithComponent: React.forwardRef<HTMLDivElement>((props, ref) => ( | ||
<div ref={ref} {...props} data-testid="custom" /> | ||
)), | ||
testWithElement: 'div', | ||
expectedClassName: classes.listbox, | ||
}, | ||
}, |
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.
@hbjORbj please add slot tests for other Joy components.
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.
Gottcha (doing in a separate PR).
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 just fixed the last error. I think we can merge this. @siriwatknp |
@@ -11,6 +11,7 @@ | |||
"onClose": "Triggered when focus leaves the menu and the menu should close.", | |||
"open": "Controls whether the menu is displayed.", | |||
"size": "The size of the component (affect other nested list* components because the <code>Menu</code> inherits <code>List</code>). To learn how to add custom sizes to the component, check out <a href=\"/joy-ui/customization/themed-components/#extend-sizes\">Themed components—Extend sizes</a>.", | |||
"slots": "The components used for each slot inside the Popper. Either a string to use a HTML element or a component. See <a href=\"#slots\">Slots API</a> below for more details.", |
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.
@hbjORbj Would this be fixed in this PR or the next one?
Screen.Recording.2566-04-10.at.09.50.07.mov
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.
👍 Thanks for fixing it!
ownerState
with ownerState
from propsownerState
with ownerState
from props
Closes #36597
This PR handles Task 1 in MUI Core Roadmap and Task 2 in MUI Core Roadmap
Affected components: Joy
Menu
, JoyAutocomplete
, JoySelect
, JoyTooltip
,MenuUnstyled
,SelectUnstyled
Before
After