Sfoglia il codice sorgente

:fire: 在查询时阻止下一次查询

visuddhinanda 3 anni fa
parent
commit
fd7c9d2e7f
1 ha cambiato i file con 2 aggiunte e 8 eliminazioni
  1. 2 8
      dashboard/src/components/dict/SearchVocabulary.tsx

+ 2 - 8
dashboard/src/components/dict/SearchVocabulary.tsx

@@ -116,14 +116,8 @@ const Widget = ({ value, onSplit, onSearch }: IWidget) => {
         }}
         onSearch={(value: string) => {
           console.log("auto complete on search", value);
-          if (fetching) {
-            console.log("fetching");
-          } else {
-            setFetching(true);
-            search(value);
-            //stopLookup();
-            //startLookup(value);
-          }
+          setFetching(true);
+          search(value);
         }}
         onSelect={(value: string, option: ValueType) => {
           if (typeof onSearch !== "undefined") {