-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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][SwitchBase] Fix spreading of handlers
in getSlotProps
#45197
Conversation
Netlify deploy previewhttps://deploy-preview-45197--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
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.
Would be nice to add a test for this.
…erial-ui into switch-base-handlers
}); | ||
|
||
expect(rootOnClick.callCount).to.equal(1); | ||
expect(inputOnClick.callCount).to.equal(1); |
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.
This test is failing in master
branch as onClick
handler wasn't spread in getSlotProps
and it's passing in this PR
handlers
was spread inroot
slot but i think it got missed ininput
slotroot slot:
material-ui/packages/mui-material/src/internal/SwitchBase.js
Lines 188 to 192 in dc7567c
input slot:
material-ui/packages/mui-material/src/internal/SwitchBase.js
Lines 214 to 216 in dc7567c