Skip to content

bug(COMPONENT): chip with autocomplete does not clear the input field after adding new chip #30339

Closed
@jolenius

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

When combining chips with the autocomplete component the input field isn't cleared between each entry. Despite setting the input fields value to a empty string at the end of my function that is invoked by the optionSelected event.

Reproduction

StackBlitz link: https://stackblitz.com/edit/2qghuqyq?file=src%2Fexample%2Fchips-autocomplete-example.ts
(stackblitz fetched from the Chips Autocomplete example at https://material.angular.io/components/chips/examples)
Steps to reproduce:

  1. Enter a few characters to start filtering the autocomplete list
  2. Select an item on the list by using your mouse

Expected Behavior

After clicking an item from the autocomplete list the input field should be cleared

Actual Behavior

The value in the input field is unchanged

Environment

  • Angular: 19
  • CDK/Material: 19
  • Browser(s): Edge
  • Operating System (e.g. Windows, macOS, Ubuntu): Linux (RHEL 8)

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/chipsdocsThis issue is related to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions