alter onSearch mechanics

This commit is contained in:
Travis Eden 2018-05-24 13:54:52 -04:00 committed by Sean Yesmunt
parent 0ca5941dee
commit 731e3a1546

View file

@ -7,6 +7,7 @@ import {
MODALS, MODALS,
doFocusSearchInput, doFocusSearchInput,
doBlurSearchInput, doBlurSearchInput,
doSearch,
} from 'lbry-redux'; } from 'lbry-redux';
import { doNavigate } from 'redux/actions/navigation'; import { doNavigate } from 'redux/actions/navigation';
import Wunderbar from './view'; import Wunderbar from './view';
@ -27,8 +28,8 @@ const select = state => {
const perform = dispatch => ({ const perform = dispatch => ({
onSearch: query => { onSearch: query => {
dispatch(doUpdateSearchQuery(query)); dispatch(doSearch(query));
dispatch(doNotify({ id: MODALS.SEARCH })); dispatch(doNavigate(`/search`, { query }));
}, },
onSubmit: (uri, extraParams) => dispatch(doNavigate('/show', { uri, ...extraParams })), onSubmit: (uri, extraParams) => dispatch(doNavigate('/show', { uri, ...extraParams })),
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)), updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),