Skip to content

Added option to reset the infinite loader #1

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

Merged
merged 2 commits into from
Jun 24, 2016
Merged

Added option to reset the infinite loader #1

merged 2 commits into from
Jun 24, 2016

Conversation

arjanwestdorp
Copy link
Contributor

When using the infinite scroll there is no ability to reset the scroll element. This can be useful when you are using the infinite scroll to show results based on filters.

  1. If you apply filter A and scroll till the end the message no more data is shown.
  2. But if you also apply filter B and start over again with the list then the "no more data" message is still being shown and the scroll don't work anymore. If you can fire the reset event it will 'reload' the infinite scroll element.

When using the infinite scroll there is no ability to reset the scroll element. This can be useful when you are using the infinite scroll list to show results based on filters. If you apply filter A and scroll till the end the message no more data is shown. But if you also apply filter B then you will reset the list and also the messages that there are either no results or no more data.
@PeachScript
Copy link
Owner

PeachScript commented Jun 23, 2016

This is a really problem and I think most of the people will get it, thanks for your idea and PR!

And maybe execute scrollHandler after the reset logic is much better, if not, user must scroll manually to load more data after toggle filter, how do you think it?

@arjanwestdorp
Copy link
Contributor Author

It is an option, although it's called reset so you expect it to be in the initial state. And then is the ScrollHandler also not called right?

@PeachScript
Copy link
Owner

You're very considerate, I will rethink the option that fire scrollHandler automatically and refactor code in stable version.

Thanks again :)

@PeachScript PeachScript merged commit 0ccc944 into PeachScript:master Jun 24, 2016
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