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

248
Views
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 answers
Answer question

0

Adding this prop seems to solve the problem for me:

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