Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

591
Views
Why is the background color of my MUI TextField changing after I enter data and how do I prevent that?

I have a TextField inside a FormControl inside a Styled Control (Paper) that looks like this:

const StyledPaper = styled(Paper)(({ theme }) => ({
  backgroundColor: "#99d6ff",
  width: '90%',
  justify: 'center',
  textAlign: 'center'
}));
...
<StyledPaper square={false} >
  <FormControl variant="filled" fullWidth>
    <TextField
      id="loginInput"
      label="Login"
      InputLabelProps={{ shrink: true }}
      value={login}
      onChange={() => handleInputChange("loginInput")} />
  </FormControl>
</StyledPaper>

The problem I'm having here is that when you select the TextField and fill it with an autocomplete, the background changes to white (the color of the autocomplete background). If I just type and don't use the autocomplete the background remains as I intended from the StyledPaper. How can I prevent the background color change?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!