Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

[Bugfix] Properly update search query when using browser navigation #604

Merged
merged 2 commits into from
Nov 14, 2017

Conversation

lsanwick
Copy link
Contributor

Summary

This example properly updates the browser history on changes, but if you navigate using the browser back and next buttons, the search query doesn't change to match. This addition of a componentWillReceiveProps lifecycle method fixes that issue.

Result

Clone the example, run yarn, then yarn start. Verify that searching and filtering still work correctly, and that browser navigation and full reload both maintain the search state correctly.

@algobot
Copy link
Contributor

algobot commented Nov 13, 2017

Deploy preview ready!

Built with commit 9421389

https://deploy-preview-604--react-instantsearch.netlify.com

This example properly updates the browser history on changes, but if you navigate using the browser back and next buttons, the search query doesn't change to match. This addition of a `componentWillReceiveProps` lifecycle method fixes that issue.
Copy link
Collaborator

@samouss samouss left a comment

Choose a reason for hiding this comment

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

LGTM 👍, thanks @lsanwick

@samouss samouss merged commit 9ee6600 into algolia:master Nov 14, 2017
@lsanwick lsanwick deleted the patch-1 branch November 17, 2017 17:31
samouss added a commit that referenced this pull request Nov 27, 2017
<a name="4.3.0-beta.0"></a>
# [4.3.0-beta.0](v4.2.0...v4.3.0-beta.0) (2017-11-27)

### Bug Fixes

* **babelrc:** add a key for each env development, production, es ([#547](#547)) ([fa9528d](fa9528d))
* **localizecount:** allow localized string for count in MenuSelect ([#657](#657)) ([67ebd34](67ebd34))
* **react-router-example:** Properly update search query when using browser navigation ([#604](#604)) ([9ee6600](9ee6600))

### Features

* **refreshcache:** add prop refresh to InstantSearch instance ([#619](#619)) ([19f6de0](19f6de0))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants