X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/36f8f69a5bf5c19ad3c8de57466944e2b7d0c390..e9e0cc24a86e55e7b6421b352800ff29f201a29d:/src/components/chips/chips.tsx diff --git a/src/components/chips/chips.tsx b/src/components/chips/chips.tsx index 36cf2412c4..75ae00f4cf 100644 --- a/src/components/chips/chips.tsx +++ b/src/components/chips/chips.tsx @@ -5,7 +5,7 @@ import * as React from 'react'; import { Chip, Grid, StyleRulesCallback, withStyles } from '@material-ui/core'; import { DragSource, DragSourceSpec, DragSourceCollector, ConnectDragSource, DropTarget, DropTargetSpec, DropTargetCollector, ConnectDropTarget } from 'react-dnd'; -import { compose, noop } from 'lodash/fp'; +import { compose } from 'lodash/fp'; import { WithStyles } from '@material-ui/core/styles'; interface ChipsProps { values: Value[]; @@ -14,6 +14,7 @@ interface ChipsProps { deletable?: boolean; orderable?: boolean; onChange: (value: Value[]) => void; + clickable?: boolean; } type CssRules = 'root'; @@ -90,6 +91,7 @@ export const Chips = withStyles(styles)( onDelete={this.props.deletable ? this.deleteValue(value) : undefined} + clickable={this.props.clickable} label={this.props.getLabel ? this.props.getLabel(value) : typeof value === 'object'