[ARVADOS-WORKBENCH2] updated: 1.4.1-73-gfb9e1c37

Git user git at public.curoverse.com
Tue Oct 29 17:07:51 UTC 2019


Summary of changes:
 src/store/search-bar/search-bar-actions.ts | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

       via  fb9e1c37cd3686f71140763202208dea17d7cd73 (commit)
      from  c541910768512998c6e7b31d7f128837772b4ed1 (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 fb9e1c37cd3686f71140763202208dea17d7cd73
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Oct 29 13:06:54 2019 -0400

    15669: Advanced search also sets query in URI

diff --git a/src/store/search-bar/search-bar-actions.ts b/src/store/search-bar/search-bar-actions.ts
index 11dc1ef5..d9238ef2 100644
--- a/src/store/search-bar/search-bar-actions.ts
+++ b/src/store/search-bar/search-bar-actions.ts
@@ -72,16 +72,17 @@ export const searchData = (searchValue: string) =>
                 dispatch(searchBarActions.CLOSE_SEARCH_VIEW());
                 dispatch(navigateToSearchResults(searchValue));
             }
-	}
+        }
     };
 
 export const searchAdvanceData = (data: SearchBarAdvanceFormData) =>
-    async (dispatch: Dispatch) => {
+    async (dispatch: Dispatch, getState: () => RootState) => {
         dispatch<any>(saveQuery(data));
+        const searchValue = getState().searchBar.searchValue;
         dispatch(searchResultsPanelActions.CLEAR());
         dispatch(searchBarActions.SET_CURRENT_VIEW(SearchView.BASIC));
         dispatch(searchBarActions.CLOSE_SEARCH_VIEW());
-        dispatch(navigateToSearchResults(""));
+        dispatch(navigateToSearchResults(searchValue));
     };
 
 export const setSearchValueFromAdvancedData = (data: SearchBarAdvanceFormData, prevData?: SearchBarAdvanceFormData) =>
@@ -231,15 +232,15 @@ const buildQueryFromKeyMap = (data: any, keyMap: string[][], mode: 'rebuild' | '
 
         if (data.hasOwnProperty(key)) {
             const pattern = v === false
-                          ? `${field.replace(':', '\\:\\s*')}\\s*`
-                          : `${field.replace(':', '\\:\\s*')}\\:\\s*"[\\w|\\#|\\-|\\/]*"\\s*`;
+                ? `${field.replace(':', '\\:\\s*')}\\s*`
+                : `${field.replace(':', '\\:\\s*')}\\:\\s*"[\\w|\\#|\\-|\\/]*"\\s*`;
             value = value.replace(new RegExp(pattern), '');
         }
 
         if (v) {
             const nv = v === true
-                     ? `${field}`
-                     : `${field}:${v}`;
+                ? `${field}`
+                : `${field}:${v}`;
 
             if (mode === 'rebuild') {
                 value = value + ' ' + nv;
@@ -280,7 +281,7 @@ export const getQueryFromAdvancedData = (data: SearchBarAdvanceFormData, prevDat
         ['to', 'dateTo']
     ];
     _.union(data.properties, prevData ? prevData.properties : [])
-     .forEach(p => keyMap.push([`has:"${p.key}"`, `prop-"${p.key}"`]));
+        .forEach(p => keyMap.push([`has:"${p.key}"`, `prop-"${p.key}"`]));
 
     if (prevData) {
         const obj = getModifiedKeysValues(flatData(data), flatData(prevData));

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list