Search bar fixes.
This commit is contained in:
		
							parent
							
								
									0dfda66578
								
							
						
					
					
						commit
						a2e6b265d3
					
				| @ -15,5 +15,5 @@ | |||||||
| </form> | </form> | ||||||
| 
 | 
 | ||||||
| <ng-template #searchLoading> | <ng-template #searchLoading> | ||||||
|   <div class="spinner-border spinner-border-sm text-light" role="status" aria-hidden="true"></div> |   <div class="spinner-border spinner-border-sm text-light" role="status" aria-hidden="true" (click)="searchForm.valid && search()"></div> | ||||||
| </ng-template> | </ng-template> | ||||||
|  | |||||||
| @ -156,6 +156,7 @@ export class SearchFormComponent implements OnInit { | |||||||
|           this.navigate('/tx/', matches[0]); |           this.navigate('/tx/', matches[0]); | ||||||
|         } |         } | ||||||
|       } else { |       } else { | ||||||
|  |         this.searchResults.searchButtonClick(); | ||||||
|         this.isSearching = false; |         this.isSearching = false; | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -25,6 +25,13 @@ export class SearchResultsComponent implements OnChanges { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |   searchButtonClick() { | ||||||
|  |     if (this.resultsFlattened[this.activeIdx]) { | ||||||
|  |       this.selectedResult.emit(this.resultsFlattened[this.activeIdx]); | ||||||
|  |       this.results = null; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|   handleKeyDown(event: KeyboardEvent) { |   handleKeyDown(event: KeyboardEvent) { | ||||||
|     switch (event.key) { |     switch (event.key) { | ||||||
|       case 'ArrowDown': |       case 'ArrowDown': | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user