X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a855a03082f2d521ed64ef1405ed186655659f26..f6093a73debdd7135870582088202da459386f17:/src/views/collection-panel/collection-panel.tsx diff --git a/src/views/collection-panel/collection-panel.tsx b/src/views/collection-panel/collection-panel.tsx index b92557f9de..c4221937e7 100644 --- a/src/views/collection-panel/collection-panel.tsx +++ b/src/views/collection-panel/collection-panel.tsx @@ -23,7 +23,7 @@ import { ContextMenuKind } from '~/views-components/context-menu/context-menu'; import { formatFileSize } from "~/common/formatters"; import { openDetailsPanel } from '~/store/details-panel/details-panel-action'; import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions'; -import { PropertyChipComponent } from '~/views-components/resource-properties-form/property-chip'; +import { getPropertyChip } from '~/views-components/resource-properties-form/property-chip'; import { IllegalNamingWarning } from '~/components/warning/warning'; type CssRules = 'card' | 'iconHeader' | 'tag' | 'label' | 'value' | 'link'; @@ -128,10 +128,16 @@ export const CollectionPanel = withStyles(styles)( {Object.keys(item.properties).map(k => - + Array.isArray(item.properties[k]) + ? item.properties[k].map((v: string) => + getPropertyChip( + k, v, + this.handleDelete(k, v), + classes.tag)) + : getPropertyChip( + k, item.properties[k], + this.handleDelete(k, item.properties[k]), + classes.tag) )} @@ -166,8 +172,8 @@ export const CollectionPanel = withStyles(styles)( kind: SnackbarKind.SUCCESS })) - handleDelete = (key: string) => () => { - this.props.dispatch(deleteCollectionTag(key)); + handleDelete = (key: string, value: string) => () => { + this.props.dispatch(deleteCollectionTag(key, value)); } openCollectionDetails = () => {