Skip to content

call onScroll event on failed attempt to scroll down#349

Closed
rahulakrishna wants to merge 1 commit intoankeetmaini:masterfrom
rahulakrishna:master
Closed

call onScroll event on failed attempt to scroll down#349
rahulakrishna wants to merge 1 commit intoankeetmaini:masterfrom
rahulakrishna:master

Conversation

@rahulakrishna
Copy link
Copy Markdown

Changes

  • Add a listener on wheel events
  • detect the wheel direction and for cases with no scroll bar, call the onScroll event

How to Test

src/stories/WindowInfiniteScrollComponent.tsx, change the Array length to a lower number.
image

Resolves: loader doesn't appear when page is bigger than InfiniteScroll #345

Resolves: loader doesn't appear when page is bigger than InfiniteScroll ankeetmaini#345
@rahulakrishna
Copy link
Copy Markdown
Author

@ankeetmaini can we merge this?

@pablomikel
Copy link
Copy Markdown

+1
encountering this issue as well and this would be a welcome fix

@iamdarshshah
Copy link
Copy Markdown
Collaborator

Thanks for the contribution. This addresses the same "content doesn't fill the viewport" problem as #381, but via a wheel event listener workaround. The v7.0.0 rewrite handles this naturally through the IntersectionObserver sentinel, which stays visible and keeps triggering next() until content fills the container, so the wheel event approach is no longer needed. Closing as superseded.

If you'd like to keep contributing, check out the open issues or file a new one if you find something worth fixing. Looking forward to more contributions from you, let's make this the best infinite scroll library out there!

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.

3 participants