CrossSWE-Bench / statements /web-material-ui-48554.md
Silin-Chen's picture
CrossSWE-Bench: current 171-instance release
0e239c6
|
Raw History Blame Contribute Delete
703 Bytes

When a consumer passes a data-* attribute through an MUI component slotProps value, TypeScript rejects the value even though the attribute is forwarded to the DOM at runtime. The same typing problem occurs for supported MUI X slotProps. The problem is reproducible in a TypeScript project using MUI Material or MUI X slotProps, such as a Backdrop or DateCalendar slot, with a data-testid or another data-* attribute. The expected behavior is that supported slotProps accept data-* attributes through WithDataAttributes, exposed by @mui/material/utils, when consumers augment DataAttributesOverrides in @mui/utils/types, while preserving the existing strict behavior when no opt-in is configured.