-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
scope: text fieldChanges related to the text field.Changes related to the text field.
Description
Steps to reproduce
Link to live example: (required) https://stackblitz.com/edit/react-osybga?file=Demo.tsx
Steps:
- className is passed in
inputPropsand id is passed throughslotProps.htmlInput - On inspecting you can notice, className passed in
inputPropsdidn't get attached and onlyidgot attached - Since
inputPropsis deprecated not removed, as a user i would expect old behavior would work as is, irrespective of whetherslotPropsis 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
Metadata
Metadata
Assignees
Labels
scope: text fieldChanges related to the text field.Changes related to the text field.