Browse Source

fix replica toggle

shanghaikid 2 years ago
parent
commit
b83da14686
1 changed files with 3 additions and 0 deletions
  1. 3 0
      client/src/pages/dialogs/LoadCollectionDialog.tsx

+ 3 - 0
client/src/pages/dialogs/LoadCollectionDialog.tsx

@@ -155,6 +155,9 @@ const LoadCollectionDialog = (props: any) => {
   // toggle enbale replica
   // toggle enbale replica
   const handleChange = () => {
   const handleChange = () => {
     setReplicaToggle(!replicaToggle);
     setReplicaToggle(!replicaToggle);
+    if (!replicaToggle === false) {
+      setForm({ replica: 0 });
+    }
   };
   };
 
 
   const InfoIcon = icons.info;
   const InfoIcon = icons.info;