Fix search parameter initialisation for search-typeahead
authorRigel Kent <sendmemail@rigelk.eu>
Tue, 18 Feb 2020 13:33:07 +0000 (14:33 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Tue, 18 Feb 2020 13:33:07 +0000 (14:33 +0100)
client/src/app/header/search-typeahead.component.ts
client/src/app/shared/misc/list-overflow.component.scss

index 372601fa82c2c6a5fee8332d73143dc77aacce87..396a875c872c0f6f63ae98814887e9ce74b12da0 100644 (file)
@@ -35,9 +35,9 @@ export class SearchTypeaheadComponent implements OnInit, OnDestroy {
   ) {}
 
   ngOnInit () {
-    const query = this.route.snapshot.queryParams
-    if (query['search']) this.search = query['search']
-
+    this.route.queryParams
+      .pipe(first(params => params.search !== undefined && params.search !== null))
+      .subscribe(params => this.search = params.search)
     this.serverService.getConfig()
       .subscribe(config => this.serverConfig = config)
   }
index e26100aca978eb9b8bf9f3b981f24b6fb2005a66..1e5fe4c1065954b7bcfc2e17bb1664d846a7c842 100644 (file)
@@ -10,7 +10,7 @@
 
 .list-overflow-menu {
   position: absolute;
-  right: 0;
+  right: 25px;
 }
 
 button {