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 ff723eb commit d5018f5Copy full SHA for d5018f5
src/generate.tsx
@@ -722,6 +722,10 @@ export default function generateSelector<
722
// If menu is open, OptionList will take charge
723
// If mode isn't tags, press enter is not meaningful when you can't see any option
724
const onSearchSubmit = (searchText: string) => {
725
+ // prevent empty tags from appearing when you click the Enter button
726
+ if (!searchText || !searchText.trim()) {
727
+ return;
728
+ }
729
const newRawValues = Array.from(
730
new Set<RawValueType>([...mergedRawValue, searchText]),
731
);
0 commit comments