-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RefreshControl refresh indicator is not shown on iOS #35779
Comments
I'm also having this issue. To resolve I'm setting refreshing boolean after 10 mills const fetchData = ()=>{
this.setRefreshing(true)
//... data fetching logic
}
React.useEffect(() => {
setTimeout(() => {
state.fetchData()
}, 10)
}, []) |
I am also having this issue, the RefreshControl will not show when initially set to true. It will only show on pull to refresh |
I am also having this issue, any update? |
I was able to work around with setTimeout as @ngima mentioned above: import { useEffect, useState } from 'react';
import {
RefreshControlProps,
RefreshControl as RefreshControlRN,
} from 'react-native';
export function RefreshControl({ refreshing, ...other }: RefreshControlProps) {
const [isRefreshing, setRefreshing] = useState(false);
useEffect(() => {
setTimeout(() => {
setRefreshing(refreshing);
}, 10);
}, [refreshing]);
return <RefreshControlRN refreshing={isRefreshing} {...other} />;
} |
- Not present on Android - Not present for any subsequent tabs - Not present when manually pulling-to-refresh - Others are facing this in facebook/react-native#35779 - Hack suggested in facebook/react-native#35779 (comment)
- Not present on Android - Not present for any subsequent tabs - Not present when manually pulling-to-refresh - Others are facing this in facebook/react-native#35779 - Hack suggested in facebook/react-native#35779 (comment) - A 10 ms timeout worked on the simulator, but failed on the physical device - As such, I raised the timeout to 100 ms, which works on both
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
It’s still a problem… |
I am experiencing this exact problem. In the code example (or in your app), if you pull the screen down a bit you can see the loading icon so it's there, just not visible. |
same |
I have implemented a workaround by programmatically scrolling the view slightly, which makes the hidden refresh control visible on iOS.
The above code uses a This workaround ensures that the refresh control is displayed properly on iOS when the |
We are having the same issue with |
Facing this issue currently as well. |
This issue has been reported before (and sometimes incorrectly closed): #24855 & #37308 & #36173 & #24530 For us this is still reproducible:
Please upvote the issue 👍to get more attention. |
+1 |
Having the same issue with Flatlist and Flashlist |
Description
The refresh indicator for
<RefreshControl />
is not shown in<ScrollView>
and related components like<VirtualizedList />
and<FlatList />
etc.. when refreshing is initially set astrue
(i.e.refreshing={true}
).This happens in both, when using Expo Go and when using the build iOS app.
Version
0.69.7, 0.70.6
Output of
npx react-native info
System:
OS: Linux 5.15 Gentoo Linux
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 16.15 GB / 62.44 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.17.0 - ~/.config/nvm/versions/node/v16.17.0/bin/node
Yarn: 1.22.19 - ~/workspace/fgs/mobile/node_modules/.bin/yarn
npm: 2.15.12 - ~/workspace/fgs/mobile/node_modules/.bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.6 => 0.69.6
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Snack, code example, screenshot, or link to a repository
https://snack.expo.dev/@danielmorlock/refresh-indicator-bug
The text was updated successfully, but these errors were encountered: