Search tweak #123

Merged
akinwale merged 3 commits from search-tweak into master 2019-03-27 08:01:16 +01:00
2 changed files with 5 additions and 3 deletions

4
dist/bundle.js vendored
View file

@ -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 /*: string*/) {
return page === 'search' ? params && params.query : searchValue;
});
var selectIsSearching /*: (state: State) => boolean*/ = exports.selectIsSearching = (0, _reselect.createSelector)(selectState, function (state) {

View file

@ -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: string) =>
page === 'search' ? params && params.query : searchValue
);
export const selectIsSearching: (state: State) => boolean = createSelector(