Skip to content

Conversation

mathieumg
Copy link
Contributor

Tried to preserve the style as much as possible. Let me know if anything is out of place.

@nrako
Copy link
Owner

nrako commented Jul 9, 2015

That's interesting thanks @mathieumg.

Could you please add useDocument prop type with a short comment to the readme, and I'll happily merge your PR.

@nrako
Copy link
Owner

nrako commented Jul 9, 2015

Also for reference could you please describe in this PR a use case for this where using element scroll isn't sufficient?

@mathieumg
Copy link
Contributor Author

Thanks! Yes, the use case is the following: The current implementation allows to load more items when you scroll within an element's container, for example a long table with a set height and a overflow-y: scroll CSS property. This PR adds the ability to load more items when the whole page is scrolled and the bottom of the element (minus the treshold) is about to enter the viewport. I think that might even be the most common use case, but I didn't want to make it default to true to break the current API.

I'll update the README shortly!

@mathieumg
Copy link
Contributor Author

Made the change! Let me know if you want me to squash the commits.

nrako added a commit that referenced this pull request Jul 9, 2015
Added support to use the document scroll instead of the element scroll
@nrako nrako merged commit a2c3ca9 into nrako:master Jul 9, 2015
@nrako
Copy link
Owner

nrako commented Jul 9, 2015

@mathieumg mathieumg deleted the use_document branch July 9, 2015 16:11
@mathieumg
Copy link
Contributor Author

Awesome, thank you! ✨

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