Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

158
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda