We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 574e64d commit cc8b8b2Copy full SHA for cc8b8b2
1 file changed
src/index.tsx
@@ -72,6 +72,7 @@ export const TagsInput = ({
72
}
73
74
if (text && (separators || defaultSeparators).includes(e.key)) {
75
+ e.preventDefault();
76
if (beforeAddValidate && !beforeAddValidate(text, tags)) return;
77
78
if (tags.includes(text)) {
@@ -80,7 +81,6 @@ export const TagsInput = ({
80
81
82
setTags([...tags, text]);
83
e.target.value = "";
- e.preventDefault();
84
85
};
86
0 commit comments