FlatList onRefresh does not work if FlatList is nested inside SafeAreaView #21009
Closed
Description
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
Run react-native info
in your terminal and paste its contents here.
Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.4
Yarn: Not Found
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.4.1 => 16.4.1
react-native: ^0.55.4 => 0.55.4
Description
onRefresh
does not fire with the above code. Replace SafeAreaView
with View
and it works fine.
Reproducible Demo
<SafeAreaView style={{ flex: 1 }}>
<FlatList
data={[1,2,3,4,5]}
onRefresh={() => someFunction()}
refreshing={props.refreshing}
/>
</SafeAreView>