mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore(docs): update autocomplete-filter-example.ts (#8167)
This commit is contained in:
committed by
Joey Perrott
parent
0c257705a3
commit
2667c017cd
@@ -26,8 +26,8 @@ export class AutocompleteFilterExample {
|
||||
|
||||
ngOnInit() {
|
||||
this.filteredOptions = this.myControl.valueChanges
|
||||
.startWith(null)
|
||||
.map(val => val ? this.filter(val) : this.options.slice());
|
||||
.startWith('')
|
||||
.map(val => this.filter(val));
|
||||
}
|
||||
|
||||
filter(val: string): string[] {
|
||||
|
||||
Reference in New Issue
Block a user