Skip to content

bug(MatSelect): Select has more options active #26390

Closed
@CarlaAdrianaMorosan

Description

@CarlaAdrianaMorosan

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

Select has more options active (class .mat-active applied on more than one )

Reproduction

Code sample: https://stackblitz.com/edit/angular-pbxnro?file=src/app/select-example.html

Steps to reproduce:

  1. Click in the input to open the list
  2. Click outside in order to close the list
  3. Click on 'Update with 'Tacos'' button
  4. Click in the input to open the list

Expected Behavior

There is only one element which is active (has .mat-active class applied).

Actual Behavior

There are 2 elements that have the .mat-active class applied

image

Environment

  • Angular: 14.2.10
  • CDK/Material: 14.2.7
  • Browser(s): Chrome, Firefox
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/select

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions