SULLEY\ryo-h 4 лет назад
Родитель
Сommit
9ab168d56d

+ 3 - 3
packages/app/src/components/SearchPage.jsx

@@ -185,8 +185,8 @@ class SearchPage extends React.Component {
     });
     });
   }
   }
 
 
-  getCheckboxType = () => {
-    switch (this.state.selectedPages.size) {
+  getCheckboxType = (selectedPagesCount) => {
+    switch (selectedPagesCount) {
       case 0:
       case 0:
         return CheckboxType.NONE_CHECKED;
         return CheckboxType.NONE_CHECKED;
       case this.state.searchedPages.length:
       case this.state.searchedPages.length:
@@ -197,7 +197,7 @@ class SearchPage extends React.Component {
   }
   }
 
 
   updateCheckboxState = () => {
   updateCheckboxState = () => {
-    const currentCheckboxState = this.getCheckboxType;
+    const currentCheckboxState = this.getCheckboxType(this.state.selectedPages.size);
     console.log(currentCheckboxState);
     console.log(currentCheckboxState);
     this.setState({ checkboxState: currentCheckboxState });
     this.setState({ checkboxState: currentCheckboxState });
   }
   }

+ 2 - 2
packages/app/src/components/SearchPage/DeleteSelectedPageGroup.tsx

@@ -18,8 +18,8 @@ const DeleteSelectedPageGroup:FC<Props> = (props:Props) => {
   } = props;
   } = props;
 
 
   const onCheckAllPages = () => {
   const onCheckAllPages = () => {
-    if (props.onClickInvoked == null) { logger.error('onClickInvoked is null') }
-    else { props.onClickInvoked() }
+    if (onCheckInvoked == null) { logger.error('onCheckInvoked is null') }
+    else { onCheckInvoked() }
   };
   };
 
 
   return (
   return (