From 850060cc07da4d6e00390ada229c102d200aa0ff Mon Sep 17 00:00:00 2001 From: softsimon Date: Wed, 6 Jul 2022 16:07:21 +0200 Subject: [PATCH] Search result click fix. --- .../src/app/components/search-form/search-form.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/search-form/search-form.component.ts b/frontend/src/app/components/search-form/search-form.component.ts index d34659f8f..55279ca05 100644 --- a/frontend/src/app/components/search-form/search-form.component.ts +++ b/frontend/src/app/components/search-form/search-form.component.ts @@ -111,7 +111,7 @@ export class SearchFormComponent implements OnInit { selectedResult(result: any) { if (typeof result === 'string') { - this.search(); + this.search(result); } else if (result.alias) { this.navigate('/lightning/node/', result.public_key); } else if (result.short_id) { @@ -119,8 +119,8 @@ export class SearchFormComponent implements OnInit { } } - search() { - const searchText = this.searchForm.value.searchText.trim(); + search(result?: string) { + const searchText = result || this.searchForm.value.searchText.trim(); if (searchText) { this.isSearching = true; if (this.regexAddress.test(searchText)) {