From: Chocobozzz Date: Fri, 26 Jun 2020 13:41:35 +0000 (+0200) Subject: Fix search filter in video reports X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d8b382912e82a535c8158ee496fe396a84851b4e;p=oweals%2Fpeertube.git Fix search filter in video reports --- 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 }) }