-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(radio): update set disabled directly on MatRadioButton to trigger…
… change detection Fixes MatRadioButton.disabled setter to trigger change detection. MatRadioButton uses ChangeDetectionStrategy.OnPush, which works fine with disabled is bound in a template that uses <mat-radio-button>. However, if a parent directly accesses the MatRadioButton component instance (e.g., using ViewChild, as in the provided test case), there is otherwise no way for the parent to trigger change detection in the MatRadioButton due to the OnPush strategy. OnPush was added in 97a9bdc, and this same technique was added to some but not all setters. This commit also adds test coverage for directly setting disabled on MatRadioButton in general, which previously was only indirectly covered in the MatRadioGroup tests.
- Loading branch information
Showing
2 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters