add closeSearchView for search bar actions
[arvados.git] / src / views-components / search-bar / search-bar.tsx
index 0ebee777a6b32afc4bec311f277502b7ac708939..d6561c591b770f15c63144120b86549044076ca0 100644 (file)
@@ -8,12 +8,12 @@ import { Dispatch } from 'redux';
 import {
     goToView,
     searchData,
-    searchBarActions,
     deleteSavedQuery,
     saveRecentQuery,
     loadRecentQueries,
     saveQuery,
-    openSearchView
+    openSearchView,
+    closeSearchView
 } from '~/store/search-bar/search-bar-actions';
 import { SearchBarView } from '~/views-components/search-bar/search-bar-view';
 import { SearchBarAdvanceFormData } from '~/models/search-bar';
@@ -31,7 +31,7 @@ const mapStateToProps = ({ searchBar }: RootState) => {
 const mapDispatchToProps = (dispatch: Dispatch) => ({
     onSearch: (valueSearch: string) => dispatch<any>(searchData(valueSearch)),
     onSetView: (currentView: string) => dispatch(goToView(currentView)),
-    closeView: () => dispatch<any>(searchBarActions.CLOSE_SEARCH_VIEW()),
+    closeView: () => dispatch<any>(closeSearchView()),
     saveRecentQuery: (query: string) => dispatch<any>(saveRecentQuery(query)),
     loadRecentQueries: () => dispatch<any>(loadRecentQueries()),
     saveQuery: (data: SearchBarAdvanceFormData) => dispatch<any>(saveQuery(data)),