0

I'm using a ScrollView in my React Native App, and calling scrollToEnd({animated: true}) within a useEffect.

When its scrolling, the scroll bar temporarily appears. Is there some way to change that behavior, so that it doesn't appear, but is still there if I manually scroll?

3
  • have you tried showsVerticalScrollIndicator prop ? Commented Sep 26, 2022 at 5:12
  • @Kailash hmm, that disables it entirely, and I'd still like to have it for manual scroll. I suppose I could disable it, and then manually enable after the scroll animation ends (though I'm not sure if the animation duration is consistent/what the duration is) Commented Sep 26, 2022 at 5:15
  • We can declare 1 state for handling showsVerticalScrollIndicator. We will set it false before calling the scrollToEnd in useEffect and when the animation is finished we can again set the state to true. Commented Sep 26, 2022 at 5:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.