What is the correct way to reset the value of a mat-button-toggle-group? I have a scenario where a mat-button-toggle is selected, then a subsequent action deselects it. My problem is that when the groups value is reset, the UI doesn't update to match.
Currently, I reset the group by setting the value of the mat-button-toggle-group to null (or undefined). This works, but the UI doesn't update to match. I thought about adding an invisible mat-button, and giving it a value of "unselected" or something like that. Seems like there should be a better way.
This stackblitz is a simple demonstration: https://stackblitz.com/edit/angular-wgsubv
Try selecting foo or bar then hit the reset button. the groups value changes, but the option appears to be selected still. If a user needs to select that same button again, they must click twice.
[checked]="model == 'foo'"with a condition, it works. Only way I've found it. Check this stackblitz.com/edit/…