-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[material-ui][FormcontrolLabel] Fix applying slotProps.typography
#42278
Conversation
Netlify deploy previewBundle size reportDetails of bundle changes (Toolpad) |
@@ -173,7 +173,7 @@ const FormControlLabel = React.forwardRef(function FormControlLabel(inProps, ref | |||
externalForwardedProps, | |||
ownerState, | |||
}); | |||
|
|||
delete typographySlotProps.ownerState; |
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.
In this PR we avoided deleting ownerState
and went with fixing spreading of ownerState
in Typograpghy
for passing slotProps correctly (PR -> #41903 ).
But fixing spreading of ownerState didn't fully fixed passing slotProps issues, as we can still see the issue mentioned in PR description, so i'm again reverting to this approach.
I believe root cause for ownerState issues are tracked here #42184
slotProps.typography
correctly
@@ -331,4 +331,23 @@ describe('<FormControlLabel />', () => { | |||
|
|||
expect(getByTestId('control')).to.have.attribute('value', 'test'); | |||
}); | |||
|
|||
it('label should have noWrap styles', function test() { |
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.
test for the fix
slotProps.typography
correctlyslotProps.typography
Not sure about argos issue, i don't think it's related to this PR (even on merging latest next branch, argos issue didn't fixed) |
closes #42277