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

Reset PostSelect current page when filters are changed #96

Merged
merged 1 commit into from
Nov 25, 2021

Conversation

wwald
Copy link
Contributor

@wwald wwald commented Nov 24, 2021

This PR fixes #95 by adding a lodash isEqual check when applying filters and setting the page back to 1 if it is found that the filters have changed.

This may be tested by going to any page N>1 on the PostSelect results and then changing the search query or any of the categories. It should now go back to page 1, with "Previous page" no longer being an option.

@wwald wwald changed the title Reset PostSelect current page when filters are changed #95 Reset PostSelect current page when filters are changed Nov 24, 2021
@wwald wwald changed the title #95 Reset PostSelect current page when filters are changed Reset PostSelect current page when filters are changed Nov 24, 2021
@wwald wwald marked this pull request as ready for review November 24, 2021 04:48
Copy link
Member

@mattheu mattheu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good I think. I've not tested this yet will aim to do so this afternoon. But approving for now.

@stuartshields stuartshields merged commit c222c00 into humanmade:main Nov 25, 2021
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.

PostSelect - Pagination offset remains after changing search query
4 participants