Closed
Description
Steps to reproduce
Steps:
- Open this link to live example: https://stackblitz.com/edit/github-yz9jia8s?file=src%2FApp.tsx
- Inspect the rendered backdrop element to see it is still using a
div
Current behavior
The component remains a div
, even when component="span"
or other element types are supplied.
Expected behavior
The backdrop component should use the specified element type. It seems slots={{ root: 'span' }}
works correctly in the way I would expect the component prop to.
Context
In our case we were using this inside a table component and to maintain a valid table structure we wanted it to render it as a "tr" component. I believe this is the same as #44283, only that was closed as it lacked an example.
Your environment
We use MUI v6 currently, but the above example demonstrates it on the latest MUI v7 version.
Search keywords: backdrop component prop