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

135
Views
Cómo evitar la anulación de defaultProps en MUI customTheme, a menos que se mencione explícitamente

Hice un tema personalizado en Material-UI , anulando los accesorios predeterminados para el componente Textfield :

 const customTheme = createTheme({ components: { MuiTextField: { defaultProps: { InputProps: { notched: false, }, }, } }

Cuando trato de usar el componente en mi proyecto, funciona como se esperaba, con el accesorio predeterminado configurado en notched:false :

 <TextField label="Enter Something" />

Sin embargo, cuando trato de mencionar algún otro accesorio en el accesorio InputProps , anula el accesorio con notched , al valor predeterminado de fábrica:

 <TextField label="Enter Something" InputProps={{ readOnly:true }} /> // component behaves like I never set the defaultProps on the customTheme

¿Cómo puedo evitar que anule mi tema personalizado, a menos que establezca explícitamente ese accesorio en la instancia del componente?

 <TextField label="Enter Something" InputProps={{ readOnly:true, notched:true }} />
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!