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

128
Views
React JS dropdown add scrollbar

code:

<select>
  <option value="grapefruit">Grapefruit</option>
  <option value="lime">Lime</option>
  <option value="coconut">Coconut</option>
  <option value="mango">Mango</option>
</select>

i am new to react and implemented drop down successfully i like to add below function to drop down

1.add vertical scrollbar 2.keep open drop down by default

any help will be appreciated.thanks in advance

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

There's no simple perfect answer to both of your questions. The <select> element is notoriously difficult to style productively with CSS and its internal structure is complex, and hard to control. But there's some workaround:

  1. When there're many options in the <select>, it will add a scroll bar automatically
  2. Trigger a click event through javascript, see this answer
about 4 years ago · Santiago Trujillo Report
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!