19969: Fix required condition on project input, make required prop required 19969-advanced-search-project-field
authorStephen Smith <stephen@curii.com>
Mon, 20 Mar 2023 19:03:38 +0000 (15:03 -0400)
committerStephen Smith <stephen@curii.com>
Mon, 20 Mar 2023 19:03:38 +0000 (15:03 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/views/run-process-panel/inputs/project-input.tsx

index 279e399c60c0ab466cb636a9380df80d79cfa595..688af4aafac9f244fe96e07c192efdc6d3bd17da 100644 (file)
@@ -24,7 +24,7 @@ export type ProjectCommandInputParameter = GenericCommandInputParameter<ProjectR
 const require: any = (value?: ProjectResource) => (value === undefined);
 
 export interface ProjectInputProps {
-    required?: boolean;
+    required: boolean;
     input: ProjectCommandInputParameter;
     options?: { showOnlyOwned: boolean, showOnlyWritable: boolean };
 }
@@ -37,7 +37,7 @@ export const ProjectInput = ({ required, input, options }: ProjectInputProps) =>
         commandInput={input}
         component={ProjectInputComponent as any}
         format={format}
-        validate={required !== undefined ? require : undefined}
+        validate={required ? require : undefined}
         {...{
             options,
             required