Parcourir la source

81100 fix function ligic

SULLEY\ryo-h il y a 4 ans
Parent
commit
28a048d697
1 fichiers modifiés avec 6 ajouts et 5 suppressions
  1. 6 5
      packages/app/src/components/SearchPage.jsx

+ 6 - 5
packages/app/src/components/SearchPage.jsx

@@ -216,14 +216,15 @@ class SearchPage extends React.Component {
       this.state.selectedPages.clear();
       // Force a render to tell React that the State has been changed by the Set class method
       this.forceUpdate();
-      return;
     }
-    this.state.searchedPages.forEach((page) => {
-      this.state.selectedPages.add(page);
-    });
+    else {
+      this.state.searchedPages.forEach((page) => {
+        this.state.selectedPages.add(page);
+      });
+    }
     // Force a render to tell React that the State has been changed by the Set class method
-    this.forceUpdate();
     this.updateCheckboxState();
+    this.forceUpdate();
   };
 
   renderSearchResultContent = () => {