From 71e75ef27e8f993eaafc73896ac6f22fe91df64a Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 18 Feb 2020 14:33:07 +0100 Subject: [PATCH] Fix search parameter initialisation for search-typeahead --- client/src/app/header/search-typeahead.component.ts | 6 +++--- client/src/app/shared/misc/list-overflow.component.scss | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/app/header/search-typeahead.component.ts b/client/src/app/header/search-typeahead.component.ts index 372601fa8..396a875c8 100644 --- a/client/src/app/header/search-typeahead.component.ts +++ b/client/src/app/header/search-typeahead.component.ts @@ -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) } diff --git a/client/src/app/shared/misc/list-overflow.component.scss b/client/src/app/shared/misc/list-overflow.component.scss index e26100aca..1e5fe4c10 100644 --- a/client/src/app/shared/misc/list-overflow.component.scss +++ b/client/src/app/shared/misc/list-overflow.component.scss @@ -10,7 +10,7 @@ .list-overflow-menu { position: absolute; - right: 0; + right: 25px; } button { -- 2.25.1