Преглед изворни кода

语法信息清空,返回空字符串

visuddhinanda пре 2 година
родитељ
комит
bee94bc4d0
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      dashboard/src/components/dict/SelectCase.tsx

+ 3 - 0
dashboard/src/components/dict/SelectCase.tsx

@@ -341,6 +341,9 @@ const SelectCaseWidget = ({ value, onCaseChange }: IWidget) => {
       onChange={(value?: (string | number)[]) => {
         console.log("case changed", value);
         if (typeof value === "undefined") {
+          if (typeof onCaseChange !== "undefined") {
+            onCaseChange("");
+          }
           return;
         }
         let newValue: (string | number)[];