X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e3b0f767bb84fa82188879e391b5feff15a3db0f..c952afae1af2fb31b68be04f70bd7ae6f9d52aba:/src/views-components/dialog-forms/create-collection-dialog.ts diff --git a/src/views-components/dialog-forms/create-collection-dialog.ts b/src/views-components/dialog-forms/create-collection-dialog.ts index 785be787..d989d431 100644 --- a/src/views-components/dialog-forms/create-collection-dialog.ts +++ b/src/views-components/dialog-forms/create-collection-dialog.ts @@ -4,17 +4,26 @@ import { compose } from "redux"; import { reduxForm } from 'redux-form'; -import { withDialog } from "~/store/dialog/with-dialog"; -import { COLLECTION_CREATE_FORM_NAME, CollectionCreateFormDialogData } from '~/store/collections/collection-create-actions'; -import { DialogCollectionCreate } from "~/views-components/dialog-create/dialog-collection-create"; -import { createCollection } from "~/store/workbench/workbench-actions"; +import { withDialog } from "store/dialog/with-dialog"; +import { COLLECTION_CREATE_FORM_NAME, CollectionCreateFormDialogData } from 'store/collections/collection-create-actions'; +import { DialogCollectionCreate } from "views-components/dialog-create/dialog-collection-create"; +import { createCollection } from "store/workbench/workbench-actions"; export const CreateCollectionDialog = compose( withDialog(COLLECTION_CREATE_FORM_NAME), reduxForm({ 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, + storageClassesDesired: data.storageClassesDesired, + properties: data.properties, + })); } }) )(DialogCollectionCreate);