diff --git a/dist/bundle.js b/dist/bundle.js index 95d03e0..93bd36f 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -3409,8 +3409,8 @@ var selectSuggestions /*: ( return state.suggestions; }); -var selectSearchQuery /*: (state: State) => ?string*/ = exports.selectSearchQuery = (0, _reselect.createSelector)(_navigation.selectCurrentPage, _navigation.selectCurrentParams, function (page /*: string*/, params /*: ?{ query: string }*/) { - return page === 'search' ? params && params.query : null; +var selectSearchQuery /*: (state: State) => ?string*/ = exports.selectSearchQuery = (0, _reselect.createSelector)(_navigation.selectCurrentPage, _navigation.selectCurrentParams, selectSearchValue, function (page /*: string*/, params /*: ?{ query: string }*/, searchValue) { + return page === 'search' ? params && params.query : searchValue; }); var selectIsSearching /*: (state: State) => boolean*/ = exports.selectIsSearching = (0, _reselect.createSelector)(selectState, function (state) { diff --git a/src/redux/selectors/search.js b/src/redux/selectors/search.js index 5a0b322..424cb8d 100644 --- a/src/redux/selectors/search.js +++ b/src/redux/selectors/search.js @@ -30,7 +30,9 @@ export const selectSuggestions: ( export const selectSearchQuery: (state: State) => ?string = createSelector( selectCurrentPage, selectCurrentParams, - (page: string, params: ?{ query: string }) => (page === 'search' ? params && params.query : null) + selectSearchValue, + (page: string, params: ?{ query: string }, searchValue) => + page === 'search' ? params && params.query : searchValue ); export const selectIsSearching: (state: State) => boolean = createSelector(