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

fix(useInfiniteScroll): fetch unexpected called twice. #32

Merged
merged 1 commit into from May 12, 2020
Merged

fix(useInfiniteScroll): fetch unexpected called twice. #32

merged 1 commit into from May 12, 2020

Conversation

LeuisKen
Copy link
Member

When initialLoad is true, and loadMore was called when initialLoad is pending,
the fetch function will be called twice with the same offset,
and the result data will be duplicated.

This commit fix this issue to ensure fetch fucntion only called once and
the result data are all unique.

Close #31

When initialLoad is true, and loadMore was called when initialLoad is pending,
the fetch function will be called twice with the same offset,
and the result data will be duplicated.

This commit fix this issue to ensure fetch fucntion only called once and
the result data are all unique.
@otakustay otakustay merged commit 3f2c13b into ecomfe:master May 12, 2020
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

Successfully merging this pull request may close these issues.

useInfiniteScroll call loadMore twice in some case.
2 participants