bug(mat-selection-list): Two mat-selection-lists with same formControl are not in sync #44237
Labels
area: forms
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone
Is this a regression?
The previous version in which this bug was not present was
No response
Description
I have two mat-selection-lists, in two different tab groups, referencing the same formControl.
Updates to the formControl via setValue correctly updates both lists.
However, when I change the selection via one of the lists in the UI, the other list is not in sync, even though formControl underlying value does change.
Reproduction
See https://stackblitz.com/edit/angular-xptorw?file=src/app/app.component.html for reproduction.
They key code is as follows:
Expected Behavior
The two lists should be in sync as long as they are referencing the same value control.
If I subscribe to the selectionChange event in each list and implement the following workaround, they become in sync:
Actual Behavior
The two lists are not in sync.
Environment
The text was updated successfully, but these errors were encountered: