Skip to content

mat-selection-list list-options don't update when formControl for mat-selection-list is updated with setValue #9085

@MikaAK

Description

@MikaAK

Bug, feature request, or proposal:

Using mat-selection-list you can provide a formControl such as

 mat-selection-list([formControl]='myControl')

which will load the myControl.value with ["MY_VALUE", "MY_VALUE2"]
However when using myControl.setValue(["MY_VALUE", "MY_VALUE2"]) from an input it doesn't cause the checkboxes to be updated!

What is the expected behavior?

Checkboxes should update

What is the current behavior?

Checkboxes do not update

What are the steps to reproduce?

https://angular-material2-issue-bvbjdy.stackblitz.io

What is the use-case or motivation for changing an existing behavior?

When using display components it's good to have inputs controlling these, however this blocks us from passing in values from the outside

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Material: 5.x.x
Angular: 5.x.x

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions