-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Regression bug
What is the expected behavior?
Updating the button toggles model and the group value results in the button toggle with this value being checked.
What is the current behavior?
When the buttons model and the group value are dynamically updated, no button toggle is selected.
What are the steps to reproduce?
Not reproducible in @angular/[email protected].
See the working example in https://stackblitz.com/edit/angular-bmrtvf-qubr3j?file=app%2Fbutton-toggle-exclusive-example.html.
Click "Switch Model". See that there is a selection with the new model.
Reproducible in @angular/[email protected]
See repro in https://angular-material2-issue-xzuj4n.stackblitz.io.
To reproduce click "Switch Model". Expect to see the first option selected but nothing is selected.
The culprit is: a403bac#diff-0ab4e17fb83eadabf9c87d06e36e93d3
What changed:
When setting the group value it is not applied unless the current list of button toggles contains the input value.
Before:
The group value was always set. Then when button toggles were created, if their value matched the group value the button will be checked.
What is the use-case or motivation for changing an existing behavior?
n/a
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material: 6.0.0