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

159
Vistas
Move focus to a particular input field using react and material UI?

Hi guy's I have made a form using react and material UI and I would like to move focus to those input fields which are missing values.enter image description here

I am highlighting those fields that are missing an input value but what I would love to do is take the focus to that particular input field. In the above example last name, date of birth, monthly income and PAN number are missing. I would like the focus to be on the last name field. I have tried using the following piece of code to focus on a particular input field but it isn't working as I would expect it to work.

autoFocus={!firstName}

So that if first name is not available the focus should go to first name input field but it hasn't worked like I had expected it to be. For individual input fields if I use autofocus it works fine. What should I use if I have multiple input fields?

Any help or suggestion is appreciated. Thank you for your time and patience.

about 4 years ago · Juan Pablo Isaza
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