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

126
Views
How to set selected option for <option> in <select> tag from props?

from API I received adCategory value (as String). I'd like to use that prop to set up default value for this select tag. For example, while rendering form component, I'd love to have Books being selected, or Furniture (depending on what I will receive from API response).

      <select
          name="adCategory"
          value={values.adCategory}
          onChange={handleChange}>

          <option value="clothes">Clothes</option>
          <option value="appliances">Appliances</option>
          <option value="books">Books</option>
          <option value="furniture">Furniture</option>
          <option value="other">Other</option>
     </select>
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!