Closed
Description
Steps to reproduce
Link to live example: (required) https://stackblitz.com/edit/react-osybga?file=Demo.tsx
Steps:
- className is passed in
inputProps
and id is passed throughslotProps.htmlInput
- On inspecting you can notice, className passed in
inputProps
didn't get attached and onlyid
got attached - Since
inputProps
is deprecated not removed, as a user i would expect old behavior would work as is, irrespective of whetherslotProps
is passed or not.
FYI: This PR actually solved this issue, we can consider merging it if we think this issue is a bug.
How to test changes changes are working in #43606
- open https://deploy-preview-43606--material-ui.netlify.app/material-ui/react-text-field/#basic-textfield demo
- paste code from above live example (I'm not able to create a sandbox from PR)
- Notice in html that both className and id got attached to input
Current behavior
props passed in inputProps
not getting attached if slotProps.htmlInput
is passed
Expected behavior
props passed in inputProps
should get attched
Context
No response
Your environment
npx @mui/envinfo
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Search keywords: TextField