diff --git a/src/material-examples/autocomplete-filter/autocomplete-filter-example.ts b/src/material-examples/autocomplete-filter/autocomplete-filter-example.ts index dde59515e0d..ffa103ae0ce 100644 --- a/src/material-examples/autocomplete-filter/autocomplete-filter-example.ts +++ b/src/material-examples/autocomplete-filter/autocomplete-filter-example.ts @@ -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[] {