15067: Clicking on a property chip copies its visual representation.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 13 Nov 2019 20:20:57 +0000 (17:20 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 13 Nov 2019 20:20:57 +0000 (17:20 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

src/views/collection-panel/collection-panel.tsx

index f4d6532e883bdf4e46d757ce6636b8d976e99064..87768e640714a7acb306e0e3705b4c9760047a67 100644 (file)
@@ -136,17 +136,14 @@ export const CollectionPanel = compose(
                                         <CollectionTagForm />
                                     </Grid>
                                     <Grid item xs={12}>
-                                        {
-                                            Object.keys(item.properties).map(k => {
-                                                const ids = `${k}: ${item.properties[k]}`;
-                                                const label = `${getTagKeyLabel(k, vocabulary)}: ${getTagValueLabel(k, item.properties[k], vocabulary)}`;
-                                                return <CopyToClipboard key={k} text={ids} onCopy={() => this.onCopy("Copied")}>
-                                                    <Chip className={classes.tag}
-                                                        onDelete={this.handleDelete(k)}
-                                                        label={label} />
-                                                </CopyToClipboard>;
-                                            })
-                                        }
+                                        {Object.keys(item.properties).map(k => {
+                                            const label = `${getTagKeyLabel(k, vocabulary)}: ${getTagValueLabel(k, item.properties[k], vocabulary)}`;
+                                            return <CopyToClipboard key={k} text={label} onCopy={() => this.onCopy("Copied")}>
+                                                <Chip className={classes.tag}
+                                                    onDelete={this.handleDelete(k)}
+                                                    label={label} />
+                                            </CopyToClipboard>;
+                                        })}
                                     </Grid>
                                 </Grid>
                             </CardContent>