X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/ff8a68b46a011c546f15d88281f842bbdee117ae..55608b9321ee5d257ccc702d370e42367ac71895:/src/views-components/form-fields/search-bar-form-fields.tsx

diff --git a/src/views-components/form-fields/search-bar-form-fields.tsx b/src/views-components/form-fields/search-bar-form-fields.tsx
index 0a6b8795..6bd6b8c2 100644
--- a/src/views-components/form-fields/search-bar-form-fields.tsx
+++ b/src/views-components/form-fields/search-bar-form-fields.tsx
@@ -17,6 +17,7 @@ import { PropertyKeyField, } from 'views-components/resource-properties-form/pro
 import { PropertyValueField } from 'views-components/resource-properties-form/property-value-field';
 import { connect } from "react-redux";
 import { RootState } from "store/store";
+import { ProjectInput, ProjectCommandInputParameter } from 'views/run-process-panel/inputs/project-input';
 
 export const SearchBarTypeField = () =>
     <Field
@@ -50,20 +51,11 @@ export const SearchBarClusterField = connect(
     );
 
 export const SearchBarProjectField = () =>
-    <Field
-        name='projectUuid'
-        component={ProjectsPicker} />;
-
-const ProjectsPicker = (props: WrappedFieldProps) =>
-    <div style={{ height: '100px', display: 'flex', flexDirection: 'column', overflow: 'overlay' }}>
-        <HomeTreePicker
-            pickerId={SEARCH_BAR_ADVANCED_FORM_PICKER_ID}
-            toggleItemActive={
-                (_: any, { id }: TreeItem<ProjectsTreePickerItem>) => {
-                    props.input.onChange(id);
-                }
-            } />
-    </div>;
+    <ProjectInput input={{
+        id: "projectObject",
+        label: "Limit search to Project"
+    } as ProjectCommandInputParameter}
+        options={{ showOnlyOwned: false, showOnlyWritable: false }} />
 
 export const SearchBarTrashField = () =>
     <Field
