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

233
Vistas
On Click Scroll To List Item So It Shows On Top

The functionality I'm trying to achieve is that when I click on a list item, it is automatically scrolled to so it shows on top. That's my code now:

groupRef?.current?.scrollIntoView({
  behavior: "smooth",
  block: "start",
});

But, it doesn't always work. A small scroll happens, but the item still not on top. My theory is that there is not enough space at the bottom for the scroll to fully accure (Because behind the scenes, a scroll bottom happens to the offset top of the list item element). How can I fix this?

about 4 years ago · Juan Pablo Isaza
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