-
Notifications
You must be signed in to change notification settings - Fork 452
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
Listview OnRefresh spins forever, how do I complete the refresh status #150
Comments
@mypark I just experienced this issue also. It looks like the ListView state stats goes into 'refreshing', but has no mechanism to come out of refreshing: https://github.com/shoutem/ui/blob/develop/components/ListView.js#L131 |
I have the same problem. Any workaround? |
You should use the It could be nice if we also had an option that |
anyone have example code for this?, @zrumenjak how to set the loading props?, isn't props should be immutable? I think I got this, please comment If I did It wrong,
|
@buncismamen yes, the idea is to change the |
Must set to this.setState({loading: true}) before changing to this.setState({loading: false}). If you just want to try how it works, use this code. onRefresh() { |
How do I set the refresh status to complete so that the spinner stops and the pull to refresh bounces back?
I implemented the onRefresh function on the ListView property and return a result but it still keeps spinning. I don't see anywhere to finish the refresh and reset the status.
note that isLoading is a redux connected property set by the apollo client which seems to work fine for the loading spinner, just not the refresh spinner. If I set loading to a state variable instead - it seems to work. Why is that?
The text was updated successfully, but these errors were encountered: