Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

428
Vistas
react material Ui textfield type password disable autofill from browser when focused on it

I am using react material UI 4 and I want to disable the browser autofill/auto complete suggestion when I focus on my password field which is coming from TextField.

My requirement is to not show suggestions when we focus on that field and the field type is password. For username and email it is working but for some reason it is not working for password field.

enter image description here

I have tried below appraoch but nothing is working

<TextField
   inputProps={{
      autoComplete: 'off'
   }}
/>

===============================
<TextField
  inputProps={{
     ...params.inputProps,
     autoComplete: 'new-password',
   }}
 />

=====================
<TextField
 autoComplete="new-password"
/>

=========================
//Below works but then this field no more acts as a password field

<TextField
   label="Password"
   className={classes.textField}
   name="password"
   inputProps={{
      type:"password",
      autoComplete: 'new-password'
   }} />

Any help will be appreciated. Thanks

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

try using the method I'm adding below. It worked for me.

<Textfield
  inputProps={{
    autocomplete: 'new-password',
    form: {
      autocomplete: 'off',
    },
  }}
  />
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>

Updated Answer: <TextField autoComplete="chrome-off" />

Let me know if you still face any issue.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda