-
-
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][utils] Merge sx
instead of override when using mergeSlotProps
#45062
Conversation
Netlify deploy previewBundle size reportDetails of bundle changes (Toolpad) |
const typedDefaultSlotProps = defaultSlotProps as Record<string, any>; | ||
const className = clsx(typedDefaultSlotProps?.className, externalSlotProps?.className); |
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.
Logic is the same, just types no remove individual type casting below.
sx
instead of override when using mergeSlotProps
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.
@siriwatknp should we consider this a breaking change?
I think this is a bug fix instead because the current logic does not meet the expected behavior (merging instead of override). |
…merge-slot-props-sx
👍 |
@siriwatknp if we want this to be available in v6, we need to cherry pick it. |
closes #45041
mergeSlotProps
currently does not merge thesx
prop (it will override instead).This PR fix the logic from overriding to merging for
sx
prop (similar toclassName
andstyle
).I think this is the correct expected behavior.