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

157
Views
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
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!