Skip to content
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][Drawer] Deprecate *Props and complete slots, slotProps #45377

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

siriwatknp
Copy link
Member

cherry pick #44960

@siriwatknp siriwatknp added component: drawer This is the name of the generic UI component, not the React module! cherry-pick The PR was cherry-picked from the newer alpha/beta/stable branch labels Feb 21, 2025
@mui-bot
Copy link

mui-bot commented Feb 21, 2025

Netlify deploy preview

SwipeableDrawer: parsed: +1.34% , gzip: +1.09%
Drawer: parsed: +1.22% , gzip: +0.94%
@material-ui/core: parsed: +0.14% , gzip: +0.12%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 0d96dc9

@siriwatknp siriwatknp merged commit 03e3b8f into mui:v6.x Feb 21, 2025
24 checks passed
@kgregory
Copy link
Member

kgregory commented Feb 28, 2025

I think this PR, released with 6.4.6, introduced a bug with Drawer's ModalProps.

This no longer seems to apply the props to the backdrop:

          <Drawer
            anchor={anchor}
            open={state[anchor]}
            onClose={toggleDrawer(anchor, false)}
            ModalProps={{
              slotProps: {
                backdrop: {
                  id: 'where-has-my-id-gone',
                },
              },
            }}
          >

To fix this, the dev needs to now use slotProps.backdrop on the Drawer, but it's a breaking change.

Issue logged: #45446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick The PR was cherry-picked from the newer alpha/beta/stable branch component: drawer This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants