Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable IntersectionObserver options #16

Open
TheodorTomas opened this issue Oct 31, 2018 · 3 comments
Open

Enable IntersectionObserver options #16

TheodorTomas opened this issue Oct 31, 2018 · 3 comments

Comments

@TheodorTomas
Copy link

Do you want to request a feature or report a bug?
feature

What is the current behaviour?

Uses default intersection options.

Desired behaviour

It would be a nice feature to be able to send down IntersectionObserver options, in particular the rootMargin option. This would allow for better UX when loading components lazily.

I would be happy to contribute to this feature if this is something you would like to add to the library.

@tazsingh
Copy link
Member

tazsingh commented Oct 31, 2018 via email

@yowakita
Copy link

@tazsingh I just noticed there was work done to the repo recently and was wondering what you thought about incorporating this capability? I also would be interested in contributing if you need some help with this feature. Rootmargin would be very nice to have so that lazy loading content as you scroll down a page feels smoother (by giving it a larger offset/time to load the element before reaching the loadable content)

@tazsingh
Copy link
Member

@yowakita I'm in favour of this capability and commented on a preferred solution on the PR: #17 (comment)

Essentially what I'd like to see there is a global function to handle setting the options, as the IntersectionObserver is a global itself.

I'm happy to review a PR if you'd like to submit one! Can close #17 in favour of a new one if you'd like also. Let me know.

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

No branches or pull requests

3 participants