Skip to content

Conversation

@eAliwei
Copy link

@eAliwei eAliwei commented Nov 27, 2025

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#2878

💡 Background and solution

Background:

  • LoadMore was triggered before the initial request ended.

Solution:

  • Add status checks before calling loadMore.

📝 Changelog

  const loadMore = useMemoizedFn(() => {
    // If loading is true do nothing
    if (noMore || loading) {
      return;
    }
    setLoadingMore(true);
    run(finalData);
  });

  const loadMoreAsync = useMemoizedFn(() => {
    if (noMore || loading) {
      return Promise.reject();
    }
    setLoadingMore(true);
    return runAsyncForCurrent(finalData);
  });
Language Changelog
🇺🇸 English fix(useInfiniteScroll): fix duplicate trigger requests
🇨🇳 Chinese fix(useInfiniteScroll): 修复重复的触发请求

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants