Explorar o código

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

visuddhinanda %!s(int64=3) %!d(string=hai) anos
pai
achega
fd7c9d2e7f
Modificáronse 1 ficheiros con 2 adicións e 8 borrados
  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) => {
         onSearch={(value: string) => {
           console.log("auto complete on search", value);
           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) => {
         onSelect={(value: string, option: ValueType) => {
           if (typeof onSearch !== "undefined") {
           if (typeof onSearch !== "undefined") {