Skip to content
Snippets Groups Projects
Unverified Commit ff644b30 authored by Chocobozzz's avatar Chocobozzz
Browse files

Reset search on page change

parent 14122085
No related branches found
No related tags found
No related merge requests found
...@@ -18,10 +18,9 @@ export class HeaderComponent implements OnInit { ...@@ -18,10 +18,9 @@ export class HeaderComponent implements OnInit {
this.router.events this.router.events
.pipe( .pipe(
filter(e => e instanceof NavigationEnd), filter(e => e instanceof NavigationEnd),
map(() => getParameterByName('search', window.location.href)), map(() => getParameterByName('search', window.location.href))
filter(searchQuery => !!searchQuery)
) )
.subscribe(searchQuery => this.searchValue = searchQuery) .subscribe(searchQuery => this.searchValue = searchQuery || '')
} }
doSearch () { doSearch () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment