diff options
Diffstat (limited to 'client/angular/videos/components/list/videos-list.component.ts')
-rw-r--r-- | client/angular/videos/components/list/videos-list.component.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/client/angular/videos/components/list/videos-list.component.ts b/client/angular/videos/components/list/videos-list.component.ts index db64a856e..94b064e16 100644 --- a/client/angular/videos/components/list/videos-list.component.ts +++ b/client/angular/videos/components/list/videos-list.component.ts | |||
@@ -78,7 +78,17 @@ export class VideosListComponent implements OnInit { | |||
78 | 78 | ||
79 | onSort(sort: SortField) { | 79 | onSort(sort: SortField) { |
80 | this.sort = sort; | 80 | this.sort = sort; |
81 | this._router.navigate(['VideosList', { sort: this.sort }]); | 81 | |
82 | const params: any = { | ||
83 | sort: this.sort | ||
84 | }; | ||
85 | |||
86 | if (this.search.value) { | ||
87 | params.search = this.search.value; | ||
88 | params.field = this.search.field; | ||
89 | } | ||
90 | |||
91 | this._router.navigate(['VideosList', params]); | ||
82 | this.getVideos(); | 92 | this.getVideos(); |
83 | } | 93 | } |
84 | } | 94 | } |