Skip to content

bug(mat-select): FormControl change not reflected in display #21583

Closed
@TheWalnutEffect

Description

@TheWalnutEffect

Reproduction

HTML
...
          <mat-select multiple formControlName="splitTypes">
            <mat-option *ngFor="let item of filteredSplitTypes" [value]="item.id">
              {{item.name}}
            </mat-option>
          </mat-select>
...
TS
...

      splitTypeControl.setValue(newSelectionsArray);
...

Steps to reproduce:

  1. Only tested when multiple select enabled. Set the value on the control.
  2. The mat-select display does not update.

Expected Behavior

What behavior were you expecting to see?
The display should update, and it did until v10.1.2

Actual Behavior

What behavior did you actually see?
The display does not change.

Environment

  • Angular: 10.2.4
  • CDK/Material: 10.2.7
  • Browser(s): Chrome
  • 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