add native select field, data text field and search bar model
[arvados.git] / src / views-components / search-bar / search-bar.tsx
index eaca7fab0bd5caab24206d1e2d3e0e0f3588eb96..0ebee777a6b32afc4bec311f277502b7ac708939 100644 (file)
@@ -12,9 +12,11 @@ import {
     deleteSavedQuery,
     saveRecentQuery,
     loadRecentQueries,
-    saveQuery
+    saveQuery,
+    openSearchView
 } from '~/store/search-bar/search-bar-actions';
 import { SearchBarView } from '~/views-components/search-bar/search-bar-view';
+import { SearchBarAdvanceFormData } from '~/models/search-bar';
 
 const mapStateToProps = ({ searchBar }: RootState) => {
     return {
@@ -29,12 +31,12 @@ const mapStateToProps = ({ searchBar }: RootState) => {
 const mapDispatchToProps = (dispatch: Dispatch) => ({
     onSearch: (valueSearch: string) => dispatch<any>(searchData(valueSearch)),
     onSetView: (currentView: string) => dispatch(goToView(currentView)),
-    openView: () => dispatch<any>(searchBarActions.OPEN_SEARCH_VIEW()),
     closeView: () => dispatch<any>(searchBarActions.CLOSE_SEARCH_VIEW()),
     saveRecentQuery: (query: string) => dispatch<any>(saveRecentQuery(query)),
     loadRecentQueries: () => dispatch<any>(loadRecentQueries()),
-    saveQuery: (query: string) => dispatch<any>(saveQuery(query)),
-    deleteSavedQuery: (id: number) => dispatch<any>(deleteSavedQuery(id))
+    saveQuery: (data: SearchBarAdvanceFormData) => dispatch<any>(saveQuery(data)),
+    deleteSavedQuery: (id: number) => dispatch<any>(deleteSavedQuery(id)),
+    openSearchView: () => dispatch<any>(openSearchView())
 });
 
 export const SearchBar = connect(mapStateToProps, mapDispatchToProps)(SearchBarView);
\ No newline at end of file