Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

249
Visualizações
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 Respostas
Responde à pergunta

0

Adding this prop seems to solve the problem for me:

maintainVisibleContentPosition={{ minIndexForVisible: 0 }}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda