Просмотр исходного кода

80875 make nullable and null check

SULLEY\ryo-h 4 лет назад
Родитель
Сommit
fed99d9a4c
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      packages/app/src/components/SearchPage/SearchResultList.tsx

+ 4 - 4
packages/app/src/components/SearchPage/SearchResultList.tsx

@@ -17,10 +17,10 @@ type Props = {
   deletionMode: boolean,
   selectedPages: ISearchedPage[],
   onClickInvoked?: (pageId: string) => void,
-  searchResultCount: number,
+  searchResultCount?: number,
   activePage: number,
-  pagingLimit: number,
-  onPagingNumberChanged: (activePage: number) => void,
+  pagingLimit?: number,
+  onPagingNumberChanged?: (activePage: number) => void,
 }
 
 const SearchResultList: FC<Props> = (props:Props) => {
@@ -39,7 +39,7 @@ const SearchResultList: FC<Props> = (props:Props) => {
       {props.searchResultCount != null && props.searchResultCount > 0 && (
         <div className="my-4 mx-auto">
           <PagenationWrapperAny
-            activePage={props.activePage}
+            activePage={props.activePage || 1}
             changePage={props.onPagingNumberChanged}
             totalItemsCount={props.searchResultCount || 0}
             pagingLimit={props.pagingLimit}