Skip to content

Commit 5f6778a

Browse files
authored
fix(post-configuration-panel): fix no create tag option in tags selector in some cases (#42)
1 parent 5bc5d7a commit 5f6778a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/post-configuration/components/TagsInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class TagsInput extends React.Component<ITagsInputProps, ITagsInputState>
5757
(!selectedTags || selectedTags.findIndex(st => st.name === tag.name) < 0)
5858
)
5959
.map(x => ({ name: x.name, key: x.id } as ITag));
60-
if (filteredTags.length <= 0 || filteredTags.findIndex(t => t.name.toLowerCase() !== filterText)) {
60+
if (filteredTags.length <= 0 || tags.findIndex(t => t.name.toLowerCase() === filterText.toLowerCase()) < 0) {
6161
filteredTags.push({ name: filterText, key: filterText, isNew: true } as INewTag);
6262
}
6363
return filteredTags;

0 commit comments

Comments
 (0)