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

130
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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