Fix search filter in video reports

pull/2904/head
Chocobozzz 2020-06-26 15:41:35 +02:00
parent 7820a54e5e
commit d8b382912e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 3 deletions

View File

@ -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 })
}