Explorar el Código

81100 switch chekcbox check or uncheck

SULLEY\ryo-h hace 4 años
padre
commit
29d9d50c5d
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      packages/app/src/components/SearchPage.jsx

+ 2 - 1
packages/app/src/components/SearchPage.jsx

@@ -192,14 +192,15 @@ class SearchPage extends React.Component {
   }
 
   toggleAllCheckBox = () => {
-    console.log(this.state.selectedPages.size);
     if (this.state.selectedPages.size === this.state.searchedPages.length) {
       this.state.selectedPages.clear();
+      this.forceUpdate();
       return;
     }
     this.state.searchedPages.forEach((page) => {
       this.state.selectedPages.add(page);
     });
+    this.forceUpdate();
   };
 
   renderSearchResultContent = () => {