Skip to content

Fix: scrollThreshold is not properly applied in inverse mode#382

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

Fix: scrollThreshold is not properly applied in inverse mode#382
oscar60310 wants to merge 1 commit intoankeetmaini:masterfrom
oscar60310:master

Conversation

@oscar60310
Copy link
Copy Markdown

What's happened

In inverse mode, scrollThreshold was not properly applied, so we needed to scroll to the end to trigger next function calls.

before.mp4

Solution

We should multiply it with scrollHeight as we did in normal mode.

after.mp4

@BaDo2001
Copy link
Copy Markdown

@oscar60310 Any update on this?

@oscar60310
Copy link
Copy Markdown
Author

Hi, the fix should work, but the project seems to be inactive. Therefore, I have duplicated the code into our project instead.

@iamdarshshah
Copy link
Copy Markdown
Collaborator

Thanks for the careful arithmetic fix. The v7.0.0 rewrite replaced all manual scroll position math with IntersectionObserver and a buildRootMargin utility, so there's no scrollTop-based threshold calculation in the current codebase. 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