aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/header/header.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-22 11:03:44 +0200
committerChocobozzz <me@florianbigard.com>2018-06-22 15:11:03 +0200
commitff644b3066e18f232ce0b9de9129f34d42d3f35d (patch)
treed862d0c909ba99d017e201e06ba78d882291cdcd /client/src/app/header/header.component.ts
parent14122085ecbe9ede74951aab42c4e0ce3b031e14 (diff)
downloadPeerTube-ff644b3066e18f232ce0b9de9129f34d42d3f35d.tar.gz
PeerTube-ff644b3066e18f232ce0b9de9129f34d42d3f35d.tar.zst
PeerTube-ff644b3066e18f232ce0b9de9129f34d42d3f35d.zip
Reset search on page change
Diffstat (limited to 'client/src/app/header/header.component.ts')
-rw-r--r--client/src/app/header/header.component.ts5
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 () {