-
Notifications
You must be signed in to change notification settings - Fork 2.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
PullToRefresh 下拉刷新能否通过外部控制loading #5653
Comments
从直觉来说,这是合理的。父组件更新,子组件也应该跟着更新~ 所以,能不能描述下你的具体场景下要解决的实际问题是什么?或者如果可复现的话,给出一个复现的 demo:codesandbox 或 stackblitz。这样,我们可以更好的帮你解决问题 |
看起来和 InfiniteScroll 的这个 issue 比较相似:#4735 |
当时我的想法是做成一个 ref,不知道对于 PullToRefresh 来说是不是合适:#4735 (comment) |
目前项目使用的是rtk-query, 而rtk-query这个库的refetch方法并未使用promise, 另外使用ref感觉虽然降低了组件本身内部的loading复杂度, 但同时会不会增加了外部使用的理解成本和调用成本, 毕竟内部组件只需一次实现, 但外部调用可能是高频操作. |
@mnm1001 按理说不应该会出现这种情况的,可以写个复现 demo 么?这样我们才能更好地分析问题 |
Version of antd-mobile
5.22
Operating system and its version
Android
Browser and its version
No response
Sandbox to reproduce
No response
What happened?
PullToRefresh 在触发 父组件render时 会导致 下拉框立即回弹, 并且refetch的回调函数因为一些原因无法使用promise返回, 所以请问有办法通过外部控制loading状态吗
Relevant log output
No response
The text was updated successfully, but these errors were encountered: