initial version of the query autocompletion
Missing features at this point: 1. No suggestions when the input gets the focus. 2. Suggestions are not shown after selecting a suggestion.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<input matInput
|
||||
type="text"
|
||||
id="query-autocomplete-input"
|
||||
placeholder="Query"
|
||||
[formControl]="query"
|
||||
[matAutocomplete]="auto"
|
||||
(keyup)="onKey($event)"/>
|
||||
<mat-autocomplete
|
||||
#auto="matAutocomplete"
|
||||
[displayWith]="displaySuggestion"
|
||||
>
|
||||
<mat-option *ngFor="let suggestion of filteredSuggestions | async"
|
||||
[value]="suggestion">
|
||||
{{suggestion.value}}
|
||||
</mat-option>
|
||||
</mat-autocomplete>
|
||||
Reference in New Issue
Block a user