Tatiana Inama 6 лет назад
Родитель
Сommit
bf453f233f
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      recipes/src/components/TagInput/index.tsx

+ 1 - 0
recipes/src/components/TagInput/index.tsx

@@ -30,6 +30,7 @@ export const TagInput:FunctionComponent<TagInputProps> = ({ label, onNewTag, tag
   const handleKeyDown = (e: any) => {
   const handleKeyDown = (e: any) => {
     const label = e.target.value;
     const label = e.target.value;
     if (!!label && e.key === 'Enter') {
     if (!!label && e.key === 'Enter') {
+      e.preventDefault();
       updateTags(uniq([...tags, label]));
       updateTags(uniq([...tags, label]));
     }
     }
   }
   }