-
Notifications
You must be signed in to change notification settings - Fork 159
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
上拉刷新,底部会调用两次 #27
Comments
就是如果慢慢滑动,就不会触发两次,滑动过快就会很容易触发两次 |
目前把接口请求回来后先刷新页面,然后刷新状态延迟500ms,暂时解决了这个问题 |
@waterfly 我们项目中也遇到这个问题, 这个似乎是flatlist的通病. 到目前为止, 我也没有特别好的解决方案. 如果用listview 就会有精确的距离控制. 但是flatlist中 距离似乎是按照比例算的. |
目测是FlatList组件的bug。 在源码 |
0.52.0也遇到这个问题,目前每次请求都跟上次请求时间对比下,少于500毫秒不允许进入请求刷新,暂时较好的解决这个问题 |
+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个问题,在Closed里面看到过,但是我这里 onEndReachedThreshold={0.1} 设置了 ,是最新的代码,但是还是不行,如果断点调试就不会,不断点就会出现,调试了下,发现都是 _onScroll 里触发的,触发第二次是 contentsize 还没刷新,是不是因为下拉滑动过快,然后请求很快回来,然后还在 _onScroll 里执行多次触发 _maybeCallOnEndReached ?
我这边的RN是 0.46.4 ,在demo里修改RN版本后报错,iOS跑不起来
The text was updated successfully, but these errors were encountered: