Closed
Description
Reproduction
Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/angular-7-mat-button-toggle-loses-displayed-value
Steps to reproduce:
- Create a MatButtonToggleGroup with some options
- Select a value, observe that it sets its value correctly
- Update the options of it, ensuring that the currently selected option is still in the options array
- Observe that the button toggle group no longer displays its selected value
Expected Behavior
What behavior were you expecting to see?
The currently selected value is still a valid option so it should still be displayed as the selected option.
Actual Behavior
What behavior did you actually see?
The currently selected value is not displayed as the selected option, and the button group appears as if it has been reset.
Environment
- Angular: 7.2.15
- CDK/Material: 7.3.7
- Browser(s): Google Chrome 75.0.3770.100 (Official Build) (64-bit), Firefox 67.0.4 (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 1903 64 bit (18362.207)
Metadata
Metadata
Assignees
Labels
No labels