Skip to content
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

useInfiniteScroll 无限滚动加载到第二页以上,执行reload数据不会清空而是叠加 #2224

Open
huadee1108 opened this issue Jun 19, 2023 · 3 comments

Comments

@huadee1108
Copy link

useInfiniteScroll 无限滚动加载的时候,如果滚动到了第二页,这时候有filter筛选执行reload,执行完了之后请求了第一个的数据是直接追加在旧数据后面还不是清空了再加上去

@liuyib
Copy link
Collaborator

liuyib commented Jun 19, 2023

@huadee1108 麻烦提供个可复现的在线 demo

@secret821
Copy link

有问题+1 就是page会先请求1之后 还会再请求page 2

@secret821
Copy link

@huadee1108 麻烦提供个可复现的在线 demo

https://codesandbox.io/p/sandbox/default-usage-forked-h7lvjk?file=%2FApp.tsx%3A12%2C2 大致的代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants