Skip to content

Commit cc2bf64

Browse files
julianobrasiltinayuangao
authored andcommitted
fix autocomplete-chips example (#11298)
1 parent 4cbd072 commit cc2bf64

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/material-examples/chips-autocomplete/chips-autocomplete-example.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export class ChipsAutocompleteExample {
5858
if (input) {
5959
input.value = '';
6060
}
61+
62+
this.fruitCtrl.setValue(null);
6163
}
6264

6365
remove(fruit: any): void {
@@ -76,5 +78,6 @@ export class ChipsAutocompleteExample {
7678
selected(event: MatAutocompleteSelectedEvent): void {
7779
this.fruits.push(event.option.viewValue);
7880
this.fruitInput.nativeElement.value = '';
81+
this.fruitCtrl.setValue(null);
7982
}
8083
}

0 commit comments

Comments
 (0)