searching on text
[arvados-workbench2.git] / src / views-components / search-bar / search-bar.tsx
index 8dcaaf842d6125a597f071320ff5acd034664d96..5c42af20caa03e3b88db25f7d55e4debeaae5374 100644 (file)
@@ -8,7 +8,6 @@ import { Dispatch } from 'redux';
 import {
     goToView,
     searchData,
-    searchBarActions,
     deleteSavedQuery,
     saveRecentQuery,
     loadRecentQueries,
@@ -17,6 +16,7 @@ import {
 } from '~/store/search-bar/search-bar-actions';
 import { SearchBarView } from '~/views-components/search-bar/search-bar-view';
 import { SearchBarAdvanceFormData } from '~/store/search-bar/search-bar-actions';
+import { closeSearchView, navigateToItem } from '~/store/search-bar/search-bar-actions';
 
 const mapStateToProps = ({ searchBar }: RootState) => {
     return {
@@ -31,12 +31,13 @@ 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)),
     deleteSavedQuery: (id: number) => dispatch<any>(deleteSavedQuery(id)),
-    openSearchView: () => dispatch<any>(openSearchView())
+    openSearchView: () => dispatch<any>(openSearchView()),
+    navigateTo: (uuid: string) => dispatch<any>(navigateToItem(uuid))
 });
 
 export const SearchBar = connect(mapStateToProps, mapDispatchToProps)(SearchBarView);
\ No newline at end of file