Reset search on page change
This commit is contained in:
parent
14122085ec
commit
ff644b3066
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue