Search result click fix.
This commit is contained in:
parent
89c4023ddf
commit
850060cc07
@ -111,7 +111,7 @@ export class SearchFormComponent implements OnInit {
|
|||||||
|
|
||||||
selectedResult(result: any) {
|
selectedResult(result: any) {
|
||||||
if (typeof result === 'string') {
|
if (typeof result === 'string') {
|
||||||
this.search();
|
this.search(result);
|
||||||
} else if (result.alias) {
|
} else if (result.alias) {
|
||||||
this.navigate('/lightning/node/', result.public_key);
|
this.navigate('/lightning/node/', result.public_key);
|
||||||
} else if (result.short_id) {
|
} else if (result.short_id) {
|
||||||
@ -119,8 +119,8 @@ export class SearchFormComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
search() {
|
search(result?: string) {
|
||||||
const searchText = this.searchForm.value.searchText.trim();
|
const searchText = result || this.searchForm.value.searchText.trim();
|
||||||
if (searchText) {
|
if (searchText) {
|
||||||
this.isSearching = true;
|
this.isSearching = true;
|
||||||
if (this.regexAddress.test(searchText)) {
|
if (this.regexAddress.test(searchText)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user