Merge branch '15685-file-renaming-empty-name'
[arvados.git] / src / views-components / dialog-forms / create-collection-dialog.ts
index 785be787f92952daaa606a77a1d51bda436f9d27..68e6380560e673a270904b3195b2ce1ef6cced9b 100644 (file)
@@ -13,8 +13,11 @@ export const CreateCollectionDialog = compose(
     withDialog(COLLECTION_CREATE_FORM_NAME),
     reduxForm<CollectionCreateFormDialogData>({
         form: COLLECTION_CREATE_FORM_NAME,
+        touchOnChange: true,
         onSubmit: (data, dispatch) => {
-            dispatch(createCollection(data));
+            // Somehow an extra field called 'files' gets added, copy
+            // the data object to get rid of it.
+            dispatch(createCollection({ ownerUuid: data.ownerUuid, name: data.name, description: data.description }));
         }
     })
 )(DialogCollectionCreate);