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()
})
}
setQueryParams (search: string) {
const queryParams: Params = {}
if (search) Object.assign(queryParams, { search })
+
this.router.navigate([ '/admin/moderation/video-abuses/list' ], { queryParams })
}