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

Page active style issue - How to set page 1 as active? #493

Open
gbaldeon opened this issue Jul 21, 2023 · 3 comments
Open

Page active style issue - How to set page 1 as active? #493

gbaldeon opened this issue Jul 21, 2023 · 3 comments

Comments

@gbaldeon
Copy link

gbaldeon commented Jul 21, 2023

I'm building a search results page. While changing the data and the pageCount property the paginate component doesn't update the active page.

I'm using 2 datasets.

Steps to reproduce:

  1. I load dataset-1 with the paginate component and assign the pageCount property.
  2. I select the 3rd page
    image
  3. I load dataset-2 with the same paginate component and assign the pageCount property.
  4. The paginate component still shows the 3rd page as active
    image

How to reset or set page 1 as active when I change the data?

@Indranil-R
Copy link

Hi, you can manually set the Page Index to 1 upon detecting any changes in your search component or when the input state changes

@gbaldeon
Copy link
Author

gbaldeon commented Dec 12, 2023

@Indranil-R How can I set the page Index to 1? what props?

image

@jbhall4291
Copy link

Have a look at the forcePage prop
image

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

3 participants