Animation doesnt deactivate
CalvinJamesHeath opened this issue · comments
When I "Pull to Refresh" and no data comes in, the animation continues to load, even after isPullable becomes false. How I tell the component to stop the loading animation and pull back up?
The solution is to return a promise and resolve it.
<PullToRefresh
onRefresh={this.refresh}
//more props
/>
refresh = () => {
return new Promise((res) => {
//your code
res(true) // depending on your response.
});
}