-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Description
What is the expected behavior?
MatSelectionList should update option selection state when list of options changes
What 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 to options.changes on the options QueryList:
| @ContentChildren(MatListOption, {descendants: true}) options: QueryList<MatListOption>; |
This is how MatSelect works:
components/src/material/select/select.ts
Line 550 in 9eeb4b5
| this.options.changes.pipe(startWith(null), takeUntil(this._destroy)).subscribe(() => { |
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent