thmsgbrt / react-simple-pull-to-refresh

npm install react-simple-pull-to-refresh

Home Page:https://www.npmjs.com/package/react-simple-pull-to-refresh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] The loading always here when I am pull

hellohejinyu opened this issue · comments

image

How to hide it. In my opinion, the onRefresh should be a function that return a promise. When the promise resolved or rejected. The loading hide itself.

Hi @elowes !
Sorry for the delay, I'm gonna investigate that, thanks.

Hi @elowes,

I believe this happens when what is provided as a children of pull-to-refresh doesn't change after refreshing data. This is indeed not an expected behaviour.

@elowes
I believe you are now using a library since I took forever to fix it ;).
Anyway, I published a version 1.2.0 that now require onRefresh and onFetchMore to be Promises.

Thank you for your feedback and input!