mui / mui/material-ui

InputAdornment does not inherit FormControl disabled state

Open
#33,605 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: text field support: question
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.