Skip to content

Commit e1101f9

Browse files
committed
refactor(radio): remove usage of mixinDisabled
* `MatRadioGroup`'s `disabled` setter and getter methods already implement the same functionality that `mixinDisabled` provides, so `mixinDisabled` can safely be removed
1 parent d22f48c commit e1101f9

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/lib/radio/radio.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ import {
3535
CanColor,
3636
CanColorCtor,
3737
CanDisable,
38-
CanDisableCtor,
3938
CanDisableRipple,
4039
CanDisableRippleCtor,
4140
HasTabIndex,
4241
HasTabIndexCtor,
4342
mixinColor,
44-
mixinDisabled,
4543
mixinDisableRipple,
4644
mixinTabIndex,
4745
} from '@angular/material/core';
@@ -71,13 +69,6 @@ export class MatRadioChange {
7169
public value: any) {}
7270
}
7371

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-
8172
/**
8273
* A group of radio buttons. May contain one or more `<mat-radio-button>` elements.
8374
*/
@@ -89,11 +80,8 @@ export const _MatRadioGroupMixinBase: CanDisableCtor & typeof MatRadioGroupBase
8980
'role': 'radiogroup',
9081
'class': 'mat-radio-group',
9182
},
92-
inputs: ['disabled'],
9383
})
94-
export class MatRadioGroup extends _MatRadioGroupMixinBase
95-
implements AfterContentInit, ControlValueAccessor, CanDisable {
96-
84+
export class MatRadioGroup implements AfterContentInit, ControlValueAccessor, CanDisable {
9785
/** Selected value for the radio group. */
9886
private _value: any = null;
9987

@@ -205,9 +193,7 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
205193
this._markRadiosForCheck();
206194
}
207195

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

212198
/**
213199
* Initialize properties once content children are available.

0 commit comments

Comments
 (0)