diff --git a/src/panelWebView/components/Tags.tsx b/src/panelWebView/components/Tags.tsx index f60dbf15..9a5091a3 100644 --- a/src/panelWebView/components/Tags.tsx +++ b/src/panelWebView/components/Tags.tsx @@ -16,17 +16,24 @@ export const Tags: React.FunctionComponent = (props: React.PropsWith const knownTags = values.filter(v => options.includes(v)); const unknownTags = values.filter(v => !options.includes(v)); + + const generateKey = (tag: string, idx: number) => { + if (tag) { + return `${tag.replace(/ /g, "_")}-${idx}`; + } + return `tag-${idx}`; + }; return (
{ - knownTags.map(t => ( - + knownTags.map((t, idx) => ( + )) } { - unknownTags.map(t => ( - + unknownTags.map((t, idx) => ( + )) }