Explorar el Código

.length -> resizeArray

visuddhinanda hace 2 años
padre
commit
eb3954f646
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      dashboard/src/components/template/Wbw/WbwDetailFm.tsx

+ 4 - 2
dashboard/src/components/template/Wbw/WbwDetailFm.tsx

@@ -243,8 +243,10 @@ const WbwDetailFmWidget = ({
                       meaning={fm[index1]}
                       onChange={(value: string) => {
                         const newData = [...currValue];
-                        let currFm = currValue[index].split("-");
-                        currFm.length = factors[index].split("-").length;
+                        let currFm = resizeArray(
+                          currValue[index].split("-"),
+                          factors[index].split("-")
+                        );
                         currFm.forEach(
                           (value3: string, index3: number, array: string[]) => {
                             if (index3 === index1) {