[ARVADOS-WORKBENCH2] updated: 1.2.0-611-gedd6fa3
Git user
git at public.curoverse.com
Mon Oct 15 04:08:27 EDT 2018
Summary of changes:
src/store/search-bar/search-bar-actions.ts | 8 ++++++++
src/views-components/search-bar/search-bar.tsx | 6 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
via edd6fa370a9ae3bda73363b76f4ff5933241b553 (commit)
from 7c60f5e6b3a7dc1b9061876f96b7cb12f7120a2f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit edd6fa370a9ae3bda73363b76f4ff5933241b553
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date: Mon Oct 15 10:08:15 2018 +0200
add closeSearchView for search bar actions
Feature #13827
Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>
diff --git a/src/store/search-bar/search-bar-actions.ts b/src/store/search-bar/search-bar-actions.ts
index 40528d2..f752785 100644
--- a/src/store/search-bar/search-bar-actions.ts
+++ b/src/store/search-bar/search-bar-actions.ts
@@ -61,6 +61,14 @@ export const openSearchView = () =>
dispatch(searchBarActions.SET_SAVED_QUERIES(savedSearchQueries));
};
+export const closeSearchView = () =>
+ (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ const isOpen = getState().searchBar.open;
+ if(isOpen) {
+ dispatch(searchBarActions.CLOSE_SEARCH_VIEW());
+ }
+ };
+
export const searchData = (searchValue: string) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
diff --git a/src/views-components/search-bar/search-bar.tsx b/src/views-components/search-bar/search-bar.tsx
index 0ebee77..d6561c5 100644
--- a/src/views-components/search-bar/search-bar.tsx
+++ b/src/views-components/search-bar/search-bar.tsx
@@ -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)),
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list