You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The optional autoscrollToTopThreshold can be used to make the content automatically scroll to the top after making the adjustment if the user was within the threshold
But I found in the code that the automatic return to the top is implemented after the layout calculation is completed. The ScrollY of the ScrollView will be reset here, but the latest ScrollY value is not used when judging whether to return to the top (the value of isWithinThreshold).
Why is it judged that the automatic return to the top is not the latest position after the layout is updated?
I don’t know if anyone can answer my doubts 🙏 🙏 🙏
Because I found that when the last card changes from a small height to a large height, there is a probability that there will be a constant jitter back to the top.
The text was updated successfully, but these errors were encountered:
wqhui
changed the title
Why determine whether the scroll exceeds the threshold and automatically return to the top instead of using the latest position after layout update
Why is it judged that the automatic return to the top is not the latest position after the layout is updated?
Dec 19, 2024
Introduction to
autoscrollToTopThreshold
in https://reactnative.dev/docs/scrollview#maintainvisiblecontentpositionBut I found in the code that the automatic return to the top is implemented after the layout calculation is completed. The ScrollY of the ScrollView will be reset here, but the latest ScrollY value is not used when judging whether to return to the top (the value of isWithinThreshold).
flat-list-mvcp/android/src/main/java/com/mvcpscrollviewmanager/MvcpScrollViewManagerModule.java
Lines 124 to 130 in b9abef4
Why is it judged that the automatic return to the top is not the latest position after the layout is updated?
I don’t know if anyone can answer my doubts 🙏 🙏 🙏
Because I found that when the last card changes from a small height to a large height, there is a probability that there will be a constant jitter back to the top.
The text was updated successfully, but these errors were encountered: