18219: Unifies collection/project create/update properties handling actions.
[arvados-workbench2.git] / src / views-components / collection-properties / create-collection-properties-list.tsx
index 9784b55e1bda6c4112e185ea0e0940444cd605b4..b6e02cb6d09d9858440ae54ed2584011b2d52471 100644 (file)
@@ -12,12 +12,13 @@ import {
 } from '@material-ui/core';
 import { RootState } from 'store/store';
 import {
-    removePropertyFromCreateCollectionForm,
     COLLECTION_CREATE_FORM_SELECTOR,
-    CollectionProperties
+    CollectionProperties,
+    COLLECTION_CREATE_FORM_NAME
 } from 'store/collections/collection-create-actions';
 import { ArvadosTheme } from 'common/custom-theme';
 import { getPropertyChip } from '../resource-properties-form/property-chip';
+import { removePropertyFromResourceForm } from 'store/resources/resources-actions';
 
 type CssRules = 'tag';
 
@@ -42,7 +43,7 @@ const mapStateToProps = (state: RootState): CreateCollectionPropertiesListDataPr
 };
 
 const mapDispatchToProps = (dispatch: Dispatch): CreateCollectionPropertiesListActionProps => ({
-    handleDelete: (key: string, value: string) => dispatch<any>(removePropertyFromCreateCollectionForm(key, value))
+    handleDelete: (key: string, value: string) => dispatch<any>(removePropertyFromResourceForm(key, value, COLLECTION_CREATE_FORM_NAME))
 });
 
 type CreateCollectionPropertiesListProps = CreateCollectionPropertiesListDataProps &