18219: Unifies collection/project create/update properties handling actions.
[arvados-workbench2.git] / src / views-components / collection-properties / update-collection-properties-list.tsx
index 26cf5e70cf28f0395fccfa47476d0a01d7e36622..792786f2eb36a0cd1cd8bd8c4aeaf232dad0c477 100644 (file)
@@ -12,12 +12,13 @@ import {
 } from '@material-ui/core';
 import { RootState } from 'store/store';
 import {
-    removePropertyFromUpdateCollectionForm,
     COLLECTION_UPDATE_FORM_SELECTOR,
+    COLLECTION_UPDATE_FORM_NAME,
 } from 'store/collections/collection-update-actions';
 import { ArvadosTheme } from 'common/custom-theme';
 import { getPropertyChip } from '../resource-properties-form/property-chip';
 import { CollectionProperties } from 'store/collections/collection-create-actions';
+import { removePropertyFromResourceForm } from 'store/resources/resources-actions';
 
 type CssRules = 'tag';
 
@@ -42,7 +43,7 @@ const mapStateToProps = (state: RootState): UpdateCollectionPropertiesListDataPr
 };
 
 const mapDispatchToProps = (dispatch: Dispatch): UpdateCollectionPropertiesListActionProps => ({
-    handleDelete: (key: string, value: string) => dispatch<any>(removePropertyFromUpdateCollectionForm(key, value))
+    handleDelete: (key: string, value: string) => dispatch<any>(removePropertyFromResourceForm(key, value, COLLECTION_UPDATE_FORM_NAME))
 });
 
 type UpdateCollectionPropertiesListProps = UpdateCollectionPropertiesListDataProps &