-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MatSelectionList
should update option selection state when list of options changes
#16062
Comments
One problem is that |
Fixes a `mat-list-option` that is added after initialization not being selected, even if it matches the control value. Fixes angular#16062.
Fixes a `mat-list-option` that is added after initialization not being selected, even if it matches the control value. Fixes angular#16062.
Fixes a `mat-list-option` that is added after initialization not being selected, even if it matches the control value. Fixes #16062.
…#16080) Fixes a `mat-list-option` that is added after initialization not being selected, even if it matches the control value. Fixes angular#16062.
Fixes a `mat-list-option` that is added after initialization not being selected, even if it matches the control value. Fixes #16062.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
What is the expected behavior?
MatSelectionList
should update option selection state when list of options changesWhat is the current behavior?
If you change the list of options after the view has been initialised,
MatSelectionList
does not update the model of the new options to reflect that they are selected in the model.What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-ptk4tc?file=app/app.component.ts
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Latest StackBlitz template
Is there anything else we should know?
MatSelectionList
should listen tooptions.changes
on theoptions
QueryList
:components/src/material/list/selection-list.ts
Line 323 in fc0b971
This is how
MatSelect
works:components/src/material/select/select.ts
Line 550 in 9eeb4b5
The text was updated successfully, but these errors were encountered: