Skip to content

Commit

Permalink
fix(useInfiniteScroll): fix loadMore may not be called when contain…
Browse files Browse the repository at this point in the history
…er too large in some cases
  • Loading branch information
vikiboss committed Oct 22, 2024
1 parent 0633df6 commit 36e10a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-use/src/use-infinite-scroll/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export function useInfiniteScroll<R = any, T extends HTMLElement = HTMLElement>(
])

runVersionedAction(version, () => {
isCalculating.current = false
previousReturn.current = result
updateRefState('loading', false)
updateRefState('isLoadDone', !latest.current.canLoadMore(previousReturn.current))
Expand Down

0 comments on commit 36e10a1

Please sign in to comment.