From be6343d26ec07fd792de069229bd3be27e72d129 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 7 Apr 2020 02:20:24 +0200 Subject: [PATCH] Fix search after first type on input --- client/src/app/header/search-typeahead.component.html | 2 +- client/src/app/header/search-typeahead.component.ts | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/client/src/app/header/search-typeahead.component.html b/client/src/app/header/search-typeahead.component.html index 46b28ed48..710268664 100644 --- a/client/src/app/header/search-typeahead.component.html +++ b/client/src/app/header/search-typeahead.component.html @@ -1,7 +1,7 @@
diff --git a/client/src/app/header/search-typeahead.component.ts b/client/src/app/header/search-typeahead.component.ts index 396a875c8..d0350368d 100644 --- a/client/src/app/header/search-typeahead.component.ts +++ b/client/src/app/header/search-typeahead.component.ts @@ -134,7 +134,7 @@ export class SearchTypeaheadComponent implements OnInit, OnDestroy { ) } - handleKeyUp (event: KeyboardEvent) { + handleKey (event: KeyboardEvent) { event.stopImmediatePropagation() if (!this.keyboardEventsManager) return @@ -143,14 +143,11 @@ export class SearchTypeaheadComponent implements OnInit, OnDestroy { case 'ArrowUp': this.keyboardEventsManager.onKeydown(event) break - case 'Enter': - this.newSearch = false - this.doSearch() - break } } doSearch () { + this.newSearch = false const queryParams: Params = {} if (window.location.pathname === '/search' && this.route.snapshot.queryParams) {