Closed
Description
What is the expected behavior?
The mat-button-toggle-group retains the currently selected button toggle when updating data-sources (an array of objects with a string property).
What is the current behavior?
When using a mat-button-toggle-group with an ngFor, if the array of items being iterated over is changed to a different list of items, then the 'should be selected' button toggle becomes deselected.
What are the steps to reproduce?
ver. 7.3.1
https://stackblitz.com/edit/mat-button-toggle-issue
ver. 7.2.0
https://stackblitz.com/edit/mat-button-toggle-issue-working
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
My current version of angular material is 7.3.3, the last version I can find that the issue is not present is version 7.2.0.
Other Info
My guess is this issue is related to this commit.