From c88593f72f1097cc34a091b4cb4b6d6e214d1e9f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 29 Jan 2018 09:30:06 +0100 Subject: Fix search pagination --- client/src/app/shared/video/abstract-video-list.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 354373776..aaf376c81 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts @@ -10,7 +10,7 @@ import { Video } from './video.model' export abstract class AbstractVideoList implements OnInit { pagination: ComponentPagination = { currentPage: 1, - itemsPerPage: 25, + itemsPerPage: 10, totalItems: null } sort: SortField = '-createdAt' @@ -26,6 +26,9 @@ export abstract class AbstractVideoList implements OnInit { protected abstract currentRoute: string abstract titlePage: string + + protected otherParams = {} + private loadedPages: { [ id: number ]: boolean } = {} abstract getVideosObservable (): Observable<{ videos: Video[], totalVideos: number}> @@ -119,7 +122,7 @@ export abstract class AbstractVideoList implements OnInit { page: this.pagination.currentPage } - return params + return Object.assign(params, this.otherParams) } protected loadRouteParams (routeParams: { [ key: string ]: any }) { -- cgit v1.2.3