refreshControl doesn't work on Android
See original GitHub issueDescription
If I use FlatList
with a custom component as children, the refresh control doesn’t show up on Android.
Screenshots
Steps To Reproduce
If I do this, the RefreshControl
is shown in iOS but not in Android
<FlatList
keyExtractor={item => item.id}
refreshControl={
<RefreshControl refreshing={refreshing} onRefresh={_fetchFeed} />
}
renderItem={({item}) => {
return <MyCustomCard />;
}}
/>
https://user-images.githubusercontent.com/7424471/118709844-e3b29680-b7f3-11eb-9f3c-250947afd3f2.mp4
but if I do this, it’s shown on both platforms
<FlatList
keyExtractor={item => item.id}
refreshControl={
<RefreshControl refreshing={refreshing} onRefresh={_fetchFeed} />
}
renderItem={({item}) => {
return <Text>Some text</Text>;
}}
/>
https://user-images.githubusercontent.com/7424471/118710143-47d55a80-b7f4-11eb-83e2-5fd4f7cb9e76.mp4
Package versions
- React: 17.0.1
- React Native: 0.64.0
- React Native Gesture Handler: 1.10.3
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Refresh Control not working on Android -React Native
When I have more then 5 records which means there is not empty space left on screen then the refresh control won't work....
Read more >Refresh Control not working on Android -React Native-React ...
React Native local variable when used to initialise the state is updated on state update? The async-await does not work properly with useEffect()...
Read more >RefreshControl - React Native
RefreshControl. This component is used inside a ScrollView or ListView to add pull to refresh functionality. When the ScrollView is at ...
Read more >RefreshControl · React Native
RefreshControl. This component is used inside a ScrollView or ListView to add pull to refresh functionality. When the ScrollView is at scrollY: 0...
Read more >RefreshControl - Pull to Refresh in React Native Apps - Enappd
Pull to Refresh Example in Android ... I made you laugh … didn't I ? ... This will create a basic React-native app...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This seems to be the same issue as #1067. While there are some workarounds over there, the general “solution” seems to be ditching
react-native-gesture-handler
and using theScrollView
(or in this caseFlatList
) fromreact-native
instead.Having the same issue in Android phones using library version
1.7.0
, had no other workaround but to use the originalFlatList
fromreact-native
Package versions
React: 16.13.1 React Native: 0.64.1 (Expo 39) React Native Gesture Handler: 1.10.3