mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(autocomplete): Fix regex filter search (#4425)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user