X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6c2cda1556008aff8aa3c0a0aa8d8164606f5c42..3c21a435928b34cbcc6e261897855998555ab73a:/src/views-components/search-bar/search-bar-view.tsx

diff --git a/src/views-components/search-bar/search-bar-view.tsx b/src/views-components/search-bar/search-bar-view.tsx
index a81eec97e0..cfaee6d4f3 100644
--- a/src/views-components/search-bar/search-bar-view.tsx
+++ b/src/views-components/search-bar/search-bar-view.tsx
@@ -58,6 +58,7 @@ type SearchBarDataProps = {
 
 interface SearchBarActionProps {
     onSearch: (value: string) => any;
+    searchDataOnEnter: (value: string) => void;
     debounce?: number;
     onSetView: (currentView: string) => void;
     closeView: () => void;
@@ -77,8 +78,8 @@ interface SearchBarState {
 }
 
 interface RenderRecentQueriesProps {
-    text: string | JSX.Element;
-    onSearch: (searchValue: string | JSX.Element) => void;
+    text: string;
+    onSearch: (searchValue: string) => void;
 }
 
 export const RenderRecentQueries = (props: RenderRecentQueriesProps) => {
@@ -100,10 +101,10 @@ export const RenderAutocompleteItems = (props: RenderAutocompleteItemsProps) =>
 };
 
 interface RenderSavedQueriesProps {
-    text: string | JSX.Element;
+    text: string;
     id: number;
     deleteSavedQuery: (id: number) => void;
-    onSearch: (searchValue: string | JSX.Element) => void;
+    onSearch: (searchValue: string) => void;
     editSavedQuery: (data: SearchBarAdvanceFormData, id: number) => void;
     data: SearchBarAdvanceFormData;
 }
@@ -201,7 +202,7 @@ export const SearchBarView = withStyles(styles)(
             event.preventDefault();
             clearTimeout(this.timeout);
             this.props.saveRecentQuery(this.state.value);
-            this.props.onSearch(this.state.value);
+            this.props.searchDataOnEnter(this.state.value);
             this.props.loadRecentQueries();
         }
 
