Merge branch '21128-toolbar-context-menu'
[arvados-workbench2.git] / src / views-components / form-fields / collection-form-fields.tsx
index 0faa59b5223cf92355f7faa2ea5f3fb3a74682c0..7d5fcf8035ca976270140ea638b0788279b9c439 100644 (file)
@@ -59,13 +59,13 @@ export const CollectionPickerField = (props: PickerIdProp) =>
         component={CollectionTreePickerField}
         validate={COLLECTION_PROJECT_VALIDATION} />;
 
-const validateDirectory = (val) => (val ? undefined : ERROR_MESSAGE);
+const validateDirectory = (val) => (val && val.uuid ? undefined : ERROR_MESSAGE);
 
 export const DirectoryPickerField = (props: PickerIdProp) =>
     <Field
         name="destination"
         pickerId={props.pickerId}
-        component={DirectoryTreePickerField}
+        component={DirectoryTreePickerField as any}
         validate={validateDirectory} />;
 
 interface StorageClassesProps {