-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Closed
Copy link
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/autocomplete
Description
Reproduction
StackBlitz: https://stackblitz.com/edit/angular-qrv3v7?file=src/app/autocomplete-auto-active-first-option-example.html
Steps to reproduce:
- Search for "AB" in the form field
- Notice that the first option (AB) is automatically active
- Notice that the first option is greyed out because it is a disabled
Expected Behavior
The first active should be automatically selected if autoActiveFirstOption is set for the . This is the behavior when using the arrow up/down keys that any disabled are not highlighted as you use the arrow up/down keys. In this example, the option "ABC" should be automatically active since it is the first active that matches the autocomplete search text.
Actual Behavior
In the example, the first becomes active, regardless of if it has its disabled
input property set to true.
Environment
- Angular: 11.0.0
- CDK/Material: 11.0.0
- Browser(s): Chrome 87.0.4280.88
- Operating System: macOS 10.15.7
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/autocomplete