InputAdornment does not inherit FormControl disabled state
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
When placed inside a FormControl an InputBase will inherit the "Mui-disabled" class from its parent when the disabled prop is set on the FormControl. When including an InputAdornment inside said InputBase, shouldn't the same inheritance be passed to the InputAdornment? I don't see the disabled class appearing on the adornment.
I currently work around this by manually adding the "Mui-disabled" class to the InputAdornment when disabled is set, then styling on that class in the theme. I attempted to target the InputAdornment as a sibling of the InputBase with the "Mui-disabled" class but could not get it to work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the disabled FormControl, InputBase, and InputAdornment combination described in the issue, then inspect those component entry points and their existing tests. Done means an InputAdornment inside a disabled FormControl receives the expected disabled styling without requiring a manually added class.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100