-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material/autocomplete): add the ability to auto-select the active option while navigating #20699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b905ccb to
183b199
Compare
|
Overall looks good. Could we also add this option to |
Hi, he added it :) |
|
I somehow glossed right over that |
jelbourn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@crisbeto just needs a rebase |
183b199 to
ba613eb
Compare
ba613eb to
c8f2b3a
Compare
c8f2b3a to
7998f3a
Compare
7998f3a to
6d5c3b9
Compare
|
Hi @crisbeto , could you please resolve the merge conflict so I can run a fresh presubmit for this. I couldn't find the previous presubmit. This looks to me like it should be safe because the option we added is off by default 🤞 . |
|
Rebased. |
6d5c3b9 to
716fdec
Compare
716fdec to
3d6a061
Compare
3d6a061 to
22534f4
Compare
…e option while navigating Adds the `autoSelectActiveOption` input to `mat-autocomplete` which allows the consumer to opt into the behavior where the autocomplete will assign the active option value as the user is navigating through the list. The value is only propagated to the model once the panel is closed. There are a couple of UX differences when the new option is enabled: 1. If the user presses escape while there's a pending auto-selected option, the value is reverted to the last text they typed before they started navigating. 2. If the user clicks away, tabs away or presses enter while there's a pending option, it will be selected. The aforementioned UX differences are based on the Google search autocomplete and one of the examples from the W3C here: https://www.w3.org/TR/wai-aria-practices-1.1/examples/combobox/aria1.1pattern/listbox-combo.html
22534f4 to
124d442
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds the
autoSelectActiveOptioninput tomat-autocompletewhich allows the consumer to opt into the behavior where the autocomplete will assign the active option value as the user is navigating through the list. The value is only propagated to the model once the panel is closed.There are a couple of UX differences when the new option is enabled:
The aforementioned UX differences are based on the Google search autocomplete and one of the examples from the W3C here:
https://www.w3.org/TR/wai-aria-practices-1.1/examples/combobox/aria1.1pattern/listbox-combo.html