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

250
Vistas
ScrollView height does not update when deleting items inside

I have a ScrollView in my app which can contain enough content where I need to scroll to get at the bottom.

However if I scroll to the bottom and then delete some items, while the content inside the ScrollView gets smaller then ScrollView height stays the same as there is some space left under the last elements.

Only after I scroll the ScrollView for just a bit does the height of the ScrollView adapt to the content.

I tried to put a ref on ScrollView and then using

onContentSizeChange={()=> scrollViewRef.current.scrollToEnd()}

However that also scrolls scrollview to the end when the Screen is mounted and also once I delete an element for some reason I am not able to delete any of the other elements.

Like...something breaks.

Any idea what else I could do for the height of the ScrollView to resize before I do any movement of the ScrollView?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Adding this prop seems to solve the problem for me:

maintainVisibleContentPosition={{ minIndexForVisible: 0 }}
about 4 years ago · Juan Pablo Isaza 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