react-native-ptr-control
react-native-ptr-control copied to clipboard
onHeaderRefreshing fired on load
On android, the onHeaderRefreshing event is fired when the component is first mounted. On iOS it does not.
I expect that it should only fire on android once the screen is pulled down.
Example usage
<PTRControl
style={{ flex: 1 }}
enableHeaderRefresh={true}
getRef={ref => this.refOfScrollList = ref}
showsVerticalScrollIndicator={false}
onTopReachedThreshold={10}
onEndReachedThreshold={10}
scrollEnabled={true}
setHeaderHeight={60}
scrollComponent={'ScrollView'}
enableFooterInfinite={true}
onHeaderRefreshing={() => { // Executed }}
onFooterInfiniting={() => {}}
>
.... Content
</PTRControl>
@Ahagan all right , at first, i also want to prevent the case what you mentioned, but i found that it is the best solution that work well on android, in order to guaranteed the performance on android, you know, gesture in ScrollView will be interrupt by ScrollView, so this pull-to-refresh header is hidden in ScrollView, that is why on android onHeaderRefreshing will be fired on load. anyway, PR is appreciated
How can we close this situation?
is anyone solved this problem?