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

fix: move user to first page of products after applying filters #1150

Conversation

sethidden
Copy link
Contributor

@sethidden sethidden commented Jun 21, 2022

before this commit, the page number remained unchanged after changing filters

this was as problem in the scenario where:

  1. open the category Women - it has 8 pages by default
  2. go to page 8
  3. apply some filter - eg. select "Capri" in the Material section
  4. the yarn dev console where nuxt is running will report errors like
    "currentPage value 8 specified is greater than the X page(s) available"

you can't know how many pages a filter will return so always returning
to first page makes sense

this also works ok if no products are returned

before this commit, the page number remained unchanged after changing filters

this was as problem in the scenario where:
1. open the category Women - it has 8 pages by default
2. go to page 8
3. apply some filter - eg. select "Capri" in the Material section
4. the `yarn dev` console where nuxt is running will report errors like
"currentPage value 8 specified is greater than the X page(s) available"

you can't know how many pages a filter will return so always returning
to first page makes sense

this also works ok if no products are returned
@Frodigo Frodigo added this to the 1.0.0-rc.10 milestone Jun 21, 2022
@sethidden sethidden merged commit 855cd7a into develop Jun 22, 2022
@sethidden sethidden deleted the M2-667-current-page-value-2-specified-is-greater-than-the-1-pages-available branch June 22, 2022 07:10
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