X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/89c3c647797787377f4d950b38d320ee3b28e92c..c30fc0c76112671804c2bab41c561f1a6f381920:/src/components/chips/chips.tsx diff --git a/src/components/chips/chips.tsx b/src/components/chips/chips.tsx index 75ae00f4..c4724d1b 100644 --- a/src/components/chips/chips.tsx +++ b/src/components/chips/chips.tsx @@ -2,9 +2,18 @@ // // SPDX-License-Identifier: AGPL-3.0 -import * as React from 'react'; +import 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 { + DragSource, + DragSourceSpec, + DragSourceCollector, + ConnectDragSource, + DropTarget, + DropTargetSpec, + DropTargetCollector, + ConnectDropTarget +} from 'react-dnd'; import { compose } from 'lodash/fp'; import { WithStyles } from '@material-ui/core/styles'; interface ChipsProps { @@ -29,15 +38,18 @@ export const Chips = withStyles(styles)( render() { const { values, filler } = this.props; return - {values.map(this.renderChip)} + {values && values.map(this.renderChip)} {filler && {filler}} ; } - renderChip = (value: Value, index: number) => - - + renderChip = (value: Value, index: number) => { + const { deletable, getLabel } = this.props; + return + + } type = 'chip'; @@ -123,4 +135,4 @@ interface CollectedProps { interface DraggableChipProps { value: Value; -} \ No newline at end of file +}