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: bounds were overwritten by state. #1320

Merged
merged 2 commits into from
Jun 30, 2020

Conversation

Gnito
Copy link
Contributor

@Gnito Gnito commented Jun 30, 2020

Fix for bug report from FTW-hourly: sharetribe/ftw-hourly#98

Address and bounds are handled outside of MainPanel.
(I.e. TopbarSearchForm && search by moving the map.)
We should always trust urlQueryParams with those.

How to reproduce:

  1. search location
  2. edit filters
  3. move the map (or search another location)
  4. edit filters again.

URL gives initial values for filters, but in some rendering context user input is stored to the state before any "Apply" or "Reset" call is made. (Which is to say that URL might say that amenities "towel" is selected, but the user has altered that selection, but not yet applied it.) We store all the search/query parameters to state in MainPanel.js, but when one of the filters get updated we trusted location search params from the state instead of taking them directly from the URL params.

Copy link
Contributor

@OtterleyW OtterleyW left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants