Tatiana Inama пре 6 година
родитељ
комит
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 label = e.target.value;
     if (!!label && e.key === 'Enter') {
+      e.preventDefault();
       updateTags(uniq([...tags, label]));
     }
   }