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

Pager two-ways? #6

Open
mario opened this issue Jan 3, 2020 · 5 comments
Open

Pager two-ways? #6

mario opened this issue Jan 3, 2020 · 5 comments

Comments

@mario
Copy link

mario commented Jan 3, 2020

From what I can understand the docs, the pager would fire when you reach the bottom. Can I have it fire when it reaches top as well, and if I can, how?

Thanks in advance for your assistance!

@natario1
Copy link
Owner

natario1 commented Jan 3, 2020

You can choose when to trigger new pages by passing in a Pager with setPager (look at the implementations that are already available to see how it works!).

However, Pagers request new pages at the end of the current dataset - we don't support the concept of a "page -1" (before page 0). You might be able to achieve what you want anyway but it will require some workarounds in your source implementation.

@mario
Copy link
Author

mario commented Jan 3, 2020

Well, it's also the end if you go to the beginning - just a different end. I'll take a look, thank you.

@mario mario closed this as completed Jan 3, 2020
@mario
Copy link
Author

mario commented Jan 5, 2020

I would assume you don't plan on implementing something like this either?

@natario1
Copy link
Owner

natario1 commented Jan 5, 2020

I have no time for it, sorry! It would also require significant changes, both internally and in the API surface, which would complicate the concepts (page numbers for instance, would make no sense anymore...) only for the benefit of this use case.

But I would welcome a solution that does not mess with the current state too much. Maybe using negative page numbers? If you want to take a look yourself and need help, feel free to comment here.

@natario1 natario1 reopened this Jan 5, 2020
@mario
Copy link
Author

mario commented Jan 5, 2020

I'll try to take a look in the coming days/months as I'd like to use what you have here. Thanks for your offer to help :)

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