Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Commit

Permalink
Update searchTerm locally when it changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouncey committed Jan 25, 2018
1 parent 0226cb6 commit 5fc0617
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/LayoutComponents/search/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ class SearchBar extends PureComponent {

handleSearchTerm(searchTerm) {
const {
updateLastPage
updateLastPage,
updateSearchTerm
} = this.props;
updateSearchTerm(searchTerm);
const { push } = this.context.router.history;
const { pathname } = this.context.router.history.location;
if (pathname !== '/search' && searchTerm.length > 2) {
Expand Down

0 comments on commit 5fc0617

Please sign in to comment.