Yuki Takei 4 лет назад
Родитель
Сommit
028eba9ab7

+ 1 - 3
packages/app/src/components/PageList/PageListItemL.tsx

@@ -18,7 +18,6 @@ import PagePathHierarchicalLink from '../PagePathHierarchicalLink';
 type Props = {
   page: IPageWithMeta | IPageWithMeta<IPageInfoAll & IPageSearchMeta>,
   isSelected?: boolean, // is item selected(focused)
-  isCheckedAllItems?: boolean, // is checkbox of item checked
   isEnableActions?: boolean,
   showPageUpdatedTime?: boolean, // whether to show page's updated time at the top-right corner of item
   onClickCheckbox?: (pageId: string) => void,
@@ -29,7 +28,7 @@ type Props = {
 export const PageListItemL = memo((props: Props): JSX.Element => {
   const {
     // todo: refactoring variable name to clear what changed
-    page: { pageData, pageMeta }, isSelected, onClickItem, onClickCheckbox, isCheckedAllItems, isEnableActions,
+    page: { pageData, pageMeta }, isSelected, onClickItem, onClickCheckbox, isEnableActions,
     showPageUpdatedTime,
   } = props;
 
@@ -78,7 +77,6 @@ export const PageListItemL = memo((props: Props): JSX.Element => {
                 type="checkbox"
                 id="flexCheckDefault"
                 onChange={() => { onClickCheckbox(pageData._id) }}
-                checked={isCheckedAllItems}
               />
             </div>
           )}

+ 1 - 3
packages/app/src/components/SearchPage/SearchResultList.tsx

@@ -9,7 +9,6 @@ import { PageListItemL } from '../PageList/PageListItemL';
 
 type Props = {
   pages: IPageWithMeta<IPageSearchMeta>[],
-  isCheckedAllItems?: boolean,
   selectedPageId?: string,
   onPageSelected?: (page?: IPageWithMeta<IPageSearchMeta>) => void,
   onClickCheckbox?: (pageId: string) => void,
@@ -17,7 +16,7 @@ type Props = {
 
 const SearchResultList: FC<Props> = (props:Props) => {
   const {
-    pages, isCheckedAllItems, selectedPageId,
+    pages, selectedPageId,
     onPageSelected,
   } = props;
 
@@ -67,7 +66,6 @@ const SearchResultList: FC<Props> = (props:Props) => {
           <PageListItemL
             key={page.pageData._id}
             page={page}
-            isCheckedAllItems={isCheckedAllItems}
             isEnableActions={isGuestUser}
             isSelected={page.pageData._id === selectedPageId}
             onClickItem={clickItemHandler}