Skip to content

Commit

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

fixes #30339

(cherry picked from commit 00515ad)
  • Loading branch information
naaajii authored and crisbeto committed Jan 31, 2025
1 parent db54307 commit d439703
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 d439703

Please sign in to comment.