SULLEY\ryo-h 4 лет назад
Родитель
Сommit
28a048d697
1 измененных файлов с 6 добавлено и 5 удалено
  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 = () => {