diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/TagsInput.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/TagsInput.tsx index a50336bbbc..8c7b54610a 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/TagsInput.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/TagsInput.tsx @@ -90,14 +90,19 @@ export const TagsInput = ({ options: TagOption[], params: FilterOptionsState, ) => { - const filtered = filter(options, params); + const inputValue = params.inputValue.trim(); + + const filtered = filter(options, { + ...params, + inputValue, + }); - const { inputValue } = params; // Suggest the creation of a new value const isExisting = options.some( (option) => inputValue === option.title, ); - if (inputValue !== '' && !isExisting) { + + if (inputValue.length >= 2 && !isExisting) { filtered.push({ inputValue, title: `Create new value "${inputValue}"`,