-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)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
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Resetting a form with autocomplete gives a visual impression that item is still selected.
I thought the fix from #26761 would solve my issue, but unfortunately it persisted after updating.
Reproduction
StackBlitz link: https://stackblitz.com/edit/zdy1sg
Steps to reproduce:
- Open autocomplete.
- Click 'Two'.
- Click 'Reset selection'. Notice that the input box is now empty.
- Open autocomplete again and observe that 'Two' is still marked as selected even though the value is not set in the form any more.
Expected Behavior
I expected the selection list not to show any selected items when the form is reset.
Actual Behavior
Previous selected item appears selected when it's not in the form.
Environment
- Angular: 16.2.0
- CDK/Material: 16.2.0
- Browser(s): Edge and Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
RobinBomkamp
Metadata
Metadata
Assignees
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)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