Skip to content

Commit 81d94ae

Browse files
swseverancejosephperrott
authored andcommitted
refactor(radio): remove usage of mixinDisabled (angular#14666)
* `MatRadioGroup`'s `disabled` setter and getter methods already implement the same functionality that `mixinDisabled` provides, so `mixinDisabled` can safely be removed
1 parent edba2a3 commit 81d94ae

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/lib/radio/radio.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,11 @@ import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';
3434
import {
3535
CanColor,
3636
CanColorCtor,
37-
CanDisable,
38-
CanDisableCtor,
3937
CanDisableRipple,
4038
CanDisableRippleCtor,
4139
HasTabIndex,
4240
HasTabIndexCtor,
4341
mixinColor,
44-
mixinDisabled,
4542
mixinDisableRipple,
4643
mixinTabIndex,
4744
} from '@angular/material/core';
@@ -71,13 +68,6 @@ export class MatRadioChange {
7168
public value: any) {}
7269
}
7370

74-
75-
// Boilerplate for applying mixins to MatRadioGroup.
76-
/** @docs-private */
77-
export class MatRadioGroupBase { }
78-
export const _MatRadioGroupMixinBase: CanDisableCtor & typeof MatRadioGroupBase =
79-
mixinDisabled(MatRadioGroupBase);
80-
8171
/**
8272
* A group of radio buttons. May contain one or more `<mat-radio-button>` elements.
8373
*/
@@ -89,11 +79,8 @@ export const _MatRadioGroupMixinBase: CanDisableCtor & typeof MatRadioGroupBase
8979
'role': 'radiogroup',
9080
'class': 'mat-radio-group',
9181
},
92-
inputs: ['disabled'],
9382
})
94-
export class MatRadioGroup extends _MatRadioGroupMixinBase
95-
implements AfterContentInit, ControlValueAccessor, CanDisable {
96-
83+
export class MatRadioGroup implements AfterContentInit, ControlValueAccessor {
9784
/** Selected value for the radio group. */
9885
private _value: any = null;
9986

@@ -205,9 +192,7 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
205192
this._markRadiosForCheck();
206193
}
207194

208-
constructor(private _changeDetector: ChangeDetectorRef) {
209-
super();
210-
}
195+
constructor(private _changeDetector: ChangeDetectorRef) { }
211196

212197
/**
213198
* Initialize properties once content children are available.

0 commit comments

Comments
 (0)