Closed
Description
Steps to reproduce
Steps:
- Open this link to live example: https://stackblitz.com/edit/react-oda7qyqd-3t9qvtsb?file=Demo.tsx
- Observe that
ModalProps.slotProps.backdrop.id
is set - Observe that the rendered backdrop has no
id
- Switch the demo to use 6.4.5
- Observe that the rendered backdrop has an
id
Current behavior
As noted in the original PR, ModalProps.slotProps.backdrop
are not making it into slotProps.backdrop
.
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.
Expected behavior
It should apply ModalProps.slotProps.backdrop
to the backdrop.
Context
No response
Your environment
npx @mui/envinfo
System:
OS: Windows 11 10.0.26100
Binaries:
Node: 20.13.1 - C:\Program Files\nodejs\node.EXE
npm: 10.5.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.10.0 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Chrome: Not Found
Edge: Chromium (133.0.3065.82)
npmPackages:
typescript: 5.7.3 => 5.7.3
Search keywords: Drawer, slotProps