Reset search on page change

pull/707/head
Chocobozzz 2018-06-22 11:03:44 +02:00
parent 14122085ec
commit ff644b3066
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 3 deletions

View File

@ -18,10 +18,9 @@ export class HeaderComponent implements OnInit {
this.router.events
.pipe(
filter(e => e instanceof NavigationEnd),
map(() => getParameterByName('search', window.location.href)),
filter(searchQuery => !!searchQuery)
map(() => getParameterByName('search', window.location.href))
)
.subscribe(searchQuery => this.searchValue = searchQuery)
.subscribe(searchQuery => this.searchValue = searchQuery || '')
}
doSearch () {