Skip to content

Adding prefill logic to infiniteScrollHelper #25

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fstani
Copy link

@fstani fstani commented Aug 2, 2019

I've added a prefill logic to the plugin, it checks to see if when the load finishes if it has loaded enough data to fill the area, otherwise it will trigger a load again.

@fstani
Copy link
Author

fstani commented Aug 22, 2019

@rogden do you think this is a good update to the plugin?

@rogden
Copy link
Member

rogden commented Sep 1, 2019

Hey @fstani Thanks for the contribution! I had not thought of this use case but it certainly seems helpful. I'm wondering if it should be built vs being an option. Can you think of a use case where someone wouldn't want the plugin to load the next set of data if container height doesn't fill enough of the screen to cause the user to scroll, triggering the next load?

@fstani
Copy link
Author

fstani commented Sep 2, 2019

hmmm, @rogden I actually don't know, I thought of adding it as an option, since for our case it seemed necessary but I did not take a lot of time to think over other uses cases, so that's the only reason why it is optional. But I personally would rather keep it an option, that could be defaulted to true and ask the community if we should remove the option, some projects might have some specificity that not having the option might break the functionality for them.

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