From d8b382912e82a535c8158ee496fe396a84851b4e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 26 Jun 2020 15:41:35 +0200 Subject: Fix search filter in video reports --- .../moderation/video-abuse-list/video-abuse-list.component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'client/src/app/+admin') diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts index b0a655e71..409dd42c7 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts @@ -196,10 +196,10 @@ export class VideoAbuseListComponent extends RestTable implements OnInit, AfterV this.initialize() this.route.queryParams - .pipe(filter(params => params.search !== undefined && params.search !== null)) .subscribe(params => { - this.search = params.search - this.setTableFilter(params.search) + this.search = params.search || '' + + this.setTableFilter(this.search) this.loadData() }) } @@ -229,6 +229,7 @@ export class VideoAbuseListComponent extends RestTable implements OnInit, AfterV setQueryParams (search: string) { const queryParams: Params = {} if (search) Object.assign(queryParams, { search }) + this.router.navigate([ '/admin/moderation/video-abuses/list' ], { queryParams }) } -- cgit v1.2.3