TagsInput: Prevent adding duplicate tags + refactor, restyle (#56485)

This commit is contained in:
kay delaney
2022-10-10 15:56:02 +01:00
committed by GitHub
parent fb31daa92f
commit efed72096f
6 changed files with 96 additions and 101 deletions

View File

@@ -101,7 +101,7 @@ export function GeneralSettingsUnconnected({
<Input id="description-input" name="description" onBlur={onBlur} defaultValue={dashboard.description} />
</Field>
<Field label="Tags">
<TagsInput id="tags-input" tags={dashboard.tags} onChange={onTagsChange} />
<TagsInput id="tags-input" tags={dashboard.tags} onChange={onTagsChange} width={40} />
</Field>
<Field label="Folder">
<FolderPicker

View File

@@ -94,7 +94,7 @@ export const LinkSettingsEdit: React.FC<LinkSettingsEditProps> = ({ editLinkIdx,
{linkSettings.type === 'dashboards' && (
<>
<Field label="With tags">
<TagsInput tags={linkSettings.tags} placeholder="add tags" onChange={onTagsChange} />
<TagsInput tags={linkSettings.tags} onChange={onTagsChange} />
</Field>
</>
)}