You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the autocomplete is disabled, the keyboard should not try to operate the autocomplete, and no error should be thrown as a result.
What is the current behavior?
When the matAutocomplete is null and matAutocompleteDisabled is true, typing into the input triggers the keydown handler of MatAutocompleteTrigger which in turn tries to use the autocomplete. Since the autocomplete is null, an error occurs.
What is the use-case or motivation for changing an existing behavior?
Fix a bug and restore proper operation.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.0.5 Angular Material 6.3.0
Is there anything else we should know?
The new matAutocompleteDisabled feature comes from #11096 which was implemented by #11142. Simply using [matAutocomplete]="null" [matAutocompleteDisabled]="true" demonstrates the problem - however it doesn't make sense to do that. The purpose of request was to allow for creating a custom component using mat-form-field with an optional autocomplete. My Stackblitz example above shows this.