atsuki-t 3 лет назад
Родитель
Сommit
2f1f34a646

+ 4 - 4
packages/app/src/components/Admin/ExportArchiveData/SelectCollectionsModal.tsx

@@ -29,14 +29,14 @@ type Props = {
   onExportingRequested: () => void,
   onExportingRequested: () => void,
   onClose: () => void,
   onClose: () => void,
   collections: string[],
   collections: string[],
-  allChecked?: boolean,
+  isAllChecked?: boolean,
 };
 };
 
 
 const SelectCollectionsModal = (props: Props): JSX.Element => {
 const SelectCollectionsModal = (props: Props): JSX.Element => {
   const { t } = useTranslation();
   const { t } = useTranslation();
 
 
   const {
   const {
-    isOpen, onExportingRequested, onClose, collections, allChecked,
+    isOpen, onExportingRequested, onClose, collections, isAllChecked,
   } = props;
   } = props;
 
 
   const [selectedCollections, setSelectedCollections] = useState<Set<string>>(new Set());
   const [selectedCollections, setSelectedCollections] = useState<Set<string>>(new Set());
@@ -172,8 +172,8 @@ const SelectCollectionsModal = (props: Props): JSX.Element => {
   }, [collections, renderCheckboxes]);
   }, [collections, renderCheckboxes]);
 
 
   useEffect(() => {
   useEffect(() => {
-    if (allChecked) checkAll();
-  }, [allChecked, checkAll]);
+    if (isAllChecked) checkAll();
+  }, [isAllChecked, checkAll]);
 
 
   return (
   return (
     <Modal isOpen={isOpen} toggle={onClose}>
     <Modal isOpen={isOpen} toggle={onClose}>

+ 1 - 1
packages/app/src/components/Admin/G2GDataTransfer.tsx

@@ -131,7 +131,7 @@ const G2GDataTransfer = (): JSX.Element => {
         onExportingRequested={exportingRequestedHandler}
         onExportingRequested={exportingRequestedHandler}
         onClose={() => setExportModalOpen(false)}
         onClose={() => setExportModalOpen(false)}
         collections={collections}
         collections={collections}
-        allChecked={true}
+        isAllChecked
       />
       />
     </div>
     </div>
   );
   );