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

How to handle infinite scroll triggering? #14

Open
mortyccp opened this issue Apr 10, 2019 · 2 comments
Open

How to handle infinite scroll triggering? #14

mortyccp opened this issue Apr 10, 2019 · 2 comments

Comments

@mortyccp
Copy link

I would like to implement an infinite scroll ui with this library. And would like to know how can I know it's time to trigger another fetch. I seem there are no callback for this use case.

@starkwang
Copy link
Owner

Sorry for my late.
You may not need callback because Vue is a MVVM framework. You can change collection directly after your fetch is completed.

@mortyccp
Copy link
Author

I just to have an event for notifying the collection is almost scrolled to the bottom of the last element is being visible so I can do a fetch.

Right now I use scroll listener on the component or append a pseudo-component at the end of the list to act as a trigger to trigger a fetch.

If the library can provide the event then I don't have to implement that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants