Explorar o código

81100 fix function ligic

SULLEY\ryo-h %!s(int64=4) %!d(string=hai) anos
pai
achega
28a048d697
Modificáronse 1 ficheiros con 6 adicións e 5 borrados
  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 = () => {