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

Add currentPage as Prop? #3

Open
kylevalenzuela opened this issue Mar 26, 2021 · 3 comments
Open

Add currentPage as Prop? #3

kylevalenzuela opened this issue Mar 26, 2021 · 3 comments

Comments

@kylevalenzuela
Copy link

Is there any way to set currentPage as a prop? Since this is a functional component, you can't use refs.
Thanks.

@Pessi94
Copy link

Pessi94 commented Apr 6, 2021

I didn't find such a way, but I think that would be useful, right now re-render resets currentPage to 0. Also some way of accessing currentPage would be nice.

@jonathan3692bf
Copy link

jonathan3692bf commented Apr 19, 2021

Maybe an easy first step would just be allowing to set "page" as a property, and keeping that page as state in some higher-order component? Or @kylevalenzuela would you prefer also handlers for triggering next/previous pages too?

@LanaIV
Copy link

LanaIV commented Jul 22, 2021

Is it possible to retrieve current page somehow? I need to trigger an analytics event when the page changes.
I didn't find the way with the current version, but maybe there is a way I didn't find.
If it's not managed, can I make a PR to add this behavior?

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

4 participants