Currently, the only possibility to use pull-to-refresh with ScrollView is wrapping it in a RefreshComposite. AScrollView wrapped in a RefreshComposite behaves differently than a CollectionView regarding pull-to-refresh.
When the ScrollView hasn't yet been scrolled to top and pulling down beyond the minimal scroll offset, the ScrollView will overscroll instead of initiating the pull-to-refresh action.
When using a CollectionView in the same scenario, the pull-to-refresh action will be triggered instead of overscrolling, which is the more natural and expected UX.
RefreshComposite > ScrollView
CollectionView
Expected behavior
Instead of overscrolling, ScrollView wrapped inside of a RefreshComposite with refreshEnabled: true should always trigger the pull-to-refresh action when pulling down beyond the minimal scroll offset. If this is technically not possible, would it be possible to introduce a more natural pull-to-refresh behavior, similarly to the one used with CollectionView, on ScrollView itself?
After investigating this issue I believe that the only way to move forward is to implement refresh logic into ScrollView. This however duplicates functionality of RefreshComposite more or less. RFC.
Problem description
Currently, the only possibility to use pull-to-refresh with
ScrollView
is wrapping it in aRefreshComposite
. AScrollView
wrapped in aRefreshComposite
behaves differently than aCollectionView
regarding pull-to-refresh.When the
ScrollView
hasn't yet been scrolled to top and pulling down beyond the minimal scroll offset, theScrollView
will overscroll instead of initiating the pull-to-refresh action.When using a
CollectionView
in the same scenario, the pull-to-refresh action will be triggered instead of overscrolling, which is the more natural and expected UX.Expected behavior
Instead of overscrolling,
ScrollView
wrapped inside of aRefreshComposite
withrefreshEnabled: true
should always trigger the pull-to-refresh action when pulling down beyond the minimal scroll offset. If this is technically not possible, would it be possible to introduce a more natural pull-to-refresh behavior, similarly to the one used withCollectionView
, onScrollView
itself?Environment
Code snippet