Jelajahi Sumber

81100 fix function ligic

SULLEY\ryo-h 4 tahun lalu
induk
melakukan
28a048d697
1 mengubah file dengan 6 tambahan dan 5 penghapusan
  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 = () => {