aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/videos/video-list/video-list.component.ts10
-rw-r--r--client/tsconfig.json2
2 files changed, 9 insertions, 3 deletions
diff --git a/client/src/app/videos/video-list/video-list.component.ts b/client/src/app/videos/video-list/video-list.component.ts
index 062340ec5..7c6d4b992 100644
--- a/client/src/app/videos/video-list/video-list.component.ts
+++ b/client/src/app/videos/video-list/video-list.component.ts
@@ -66,6 +66,8 @@ export class VideoListComponent implements OnInit, OnDestroy {
66 // Subscribe to search changes 66 // Subscribe to search changes
67 this.subSearch = this.searchService.searchUpdated.subscribe(search => { 67 this.subSearch = this.searchService.searchUpdated.subscribe(search => {
68 this.search = search; 68 this.search = search;
69 // Reset pagination
70 this.pagination.currentPage = 1;
69 71
70 this.navigateToNewParams(); 72 this.navigateToNewParams();
71 }); 73 });
@@ -76,7 +78,7 @@ export class VideoListComponent implements OnInit, OnDestroy {
76 this.subSearch.unsubscribe(); 78 this.subSearch.unsubscribe();
77 } 79 }
78 80
79 getVideos(detectChanges = true) { 81 getVideos() {
80 this.loading.next(true); 82 this.loading.next(true);
81 this.videos = []; 83 this.videos = [];
82 84
@@ -153,7 +155,11 @@ export class VideoListComponent implements OnInit, OnDestroy {
153 155
154 this.sort = <SortField>routeParams['sort'] || '-createdDate'; 156 this.sort = <SortField>routeParams['sort'] || '-createdDate';
155 157
156 this.pagination.currentPage = parseInt(routeParams['page']) || 1; 158 if (routeParams['page'] !== undefined) {
159 this.pagination.currentPage = parseInt(routeParams['page']);
160 } else {
161 this.pagination.currentPage = 1;
162 }
157 163
158 this.changeDetector.detectChanges(); 164 this.changeDetector.detectChanges();
159 } 165 }
diff --git a/client/tsconfig.json b/client/tsconfig.json
index 7de2a1a75..20938ce55 100644
--- a/client/tsconfig.json
+++ b/client/tsconfig.json
@@ -35,12 +35,12 @@
35 "src/app/admin/admin.routes.ts", 35 "src/app/admin/admin.routes.ts",
36 "src/app/admin/friends/friend-list/friend-list.component.ts", 36 "src/app/admin/friends/friend-list/friend-list.component.ts",
37 "src/app/admin/friends/friend-list/index.ts", 37 "src/app/admin/friends/friend-list/index.ts",
38 "src/app/admin/friends/friends.component.ts",
38 "src/app/admin/friends/friends.routes.ts", 39 "src/app/admin/friends/friends.routes.ts",
39 "src/app/admin/friends/index.ts", 40 "src/app/admin/friends/index.ts",
40 "src/app/admin/friends/shared/friend.model.ts", 41 "src/app/admin/friends/shared/friend.model.ts",
41 "src/app/admin/friends/shared/friend.service.ts", 42 "src/app/admin/friends/shared/friend.service.ts",
42 "src/app/admin/friends/shared/index.ts", 43 "src/app/admin/friends/shared/index.ts",
43 "src/app/admin/friends/users.component.ts",
44 "src/app/admin/index.ts", 44 "src/app/admin/index.ts",
45 "src/app/admin/menu-admin.component.ts", 45 "src/app/admin/menu-admin.component.ts",
46 "src/app/admin/users/index.ts", 46 "src/app/admin/users/index.ts",