Skip to content

Commit

Permalink
docs: clear input field whenever a selection is
Browse files Browse the repository at this point in the history
made in chips autocomplete example

fixes angular#30339
  • Loading branch information
naaajii committed Jan 27, 2025
1 parent 8950ec3 commit dcfb135
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
[matChipInputSeparatorKeyCodes]="separatorKeysCodes"
(matChipInputTokenEnd)="add($event)"
/>
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)">
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event); fruitInput.value = ''">
@for (fruit of filteredFruits(); track fruit) {
<mat-option [value]="fruit">{{fruit}}</mat-option>
}
Expand Down

0 comments on commit dcfb135

Please sign in to comment.