diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-22 11:03:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-22 15:11:03 +0200 |
commit | ff644b3066e18f232ce0b9de9129f34d42d3f35d (patch) | |
tree | d862d0c909ba99d017e201e06ba78d882291cdcd /client/src/app | |
parent | 14122085ecbe9ede74951aab42c4e0ce3b031e14 (diff) | |
download | PeerTube-ff644b3066e18f232ce0b9de9129f34d42d3f35d.tar.gz PeerTube-ff644b3066e18f232ce0b9de9129f34d42d3f35d.tar.zst PeerTube-ff644b3066e18f232ce0b9de9129f34d42d3f35d.zip |
Reset search on page change
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/header/header.component.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/src/app/header/header.component.ts b/client/src/app/header/header.component.ts index 9d2a83773..0e999fbb1 100644 --- a/client/src/app/header/header.component.ts +++ b/client/src/app/header/header.component.ts | |||
@@ -18,10 +18,9 @@ export class HeaderComponent implements OnInit { | |||
18 | this.router.events | 18 | this.router.events |
19 | .pipe( | 19 | .pipe( |
20 | filter(e => e instanceof NavigationEnd), | 20 | filter(e => e instanceof NavigationEnd), |
21 | map(() => getParameterByName('search', window.location.href)), | 21 | map(() => getParameterByName('search', window.location.href)) |
22 | filter(searchQuery => !!searchQuery) | ||
23 | ) | 22 | ) |
24 | .subscribe(searchQuery => this.searchValue = searchQuery) | 23 | .subscribe(searchQuery => this.searchValue = searchQuery || '') |
25 | } | 24 | } |
26 | 25 | ||
27 | doSearch () { | 26 | doSearch () { |