diff --git a/src/lib/autocomplete/autocomplete.md b/src/lib/autocomplete/autocomplete.md index f5d139ae100d..4ebe6fc295f0 100644 --- a/src/lib/autocomplete/autocomplete.md +++ b/src/lib/autocomplete/autocomplete.md @@ -138,7 +138,7 @@ class MyComp { } filter(name: string): User[] { - return this.options.filter(option => new RegExp(`^${name}`, 'gi').test(option)); + return this.options.filter(option => new RegExp(`^${name}`, 'gi').test(option.name)); } displayFn(user: User): string {