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 appending wrong search query when routing #3221

Merged
merged 3 commits into from
Jul 2, 2020

Conversation

singhArmani
Copy link
Contributor

Upon filtering out the lists based on the ids, an error could occur.
Irrespective of the error, we were still storing the search value into
the localStorage.
And when user transit back to this list page, the error would persist as
we append the search query onto the URL.

This fix looks into any API error, and removes the localStorage search
value location.search, which gets set when Filter form is
submitted.

See issue: #3075

@changeset-bot
Copy link

changeset-bot bot commented Jul 2, 2020

🦋 Changeset is good to go

Latest commit: 9a41475

We got this.

This PR includes changesets to release 1 package
Name Type
@keystonejs/app-admin-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@singhArmani singhArmani self-assigned this Jul 2, 2020
@singhArmani singhArmani force-pushed the remove-location-search-error branch from c1a0139 to a848894 Compare July 2, 2020 06:04
@stale stale bot removed the needs-review label Jul 2, 2020
Upon filtering out the lists based on the ids, an error could occur.
Irrespective of the error, we were still storing the search value into
the localStorage.
And when user transit back to this list page, the error would persist as
we append the search query onto the URL.

This fix looks into any API error, and removes the localStorage search
value `location.search`, which gets set when **Filter** form is
submitted.
@singhArmani singhArmani force-pushed the remove-location-search-error branch from a848894 to 0c08d3d Compare July 2, 2020 06:06
Copy link
Contributor

@MadeByMike MadeByMike left a comment

Choose a reason for hiding this comment

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

LGTM

@timleslie timleslie merged commit e6117d2 into master Jul 2, 2020
@timleslie timleslie deleted the remove-location-search-error branch July 2, 2020 22:41
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.

3 participants