@@ -59,10 +59,11 @@ export const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {
59
59
60
60
/** Change event object emitted by MatRadio and MatRadioGroup. */
61
61
export class MatRadioChange {
62
- /** The MatRadioButton that emits the change event. */
63
- source : MatRadioButton | null ;
64
- /** The value of the MatRadioButton. */
65
- value : any ;
62
+ constructor (
63
+ /** The MatRadioButton that emits the change event. */
64
+ public source : MatRadioButton ,
65
+ /** The value of the MatRadioButton. */
66
+ public value : any ) { }
66
67
}
67
68
68
69
@@ -262,10 +263,7 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
262
263
/** Dispatch change event with current selection and group value. */
263
264
_emitChangeEvent ( ) : void {
264
265
if ( this . _isInitialized ) {
265
- const event = new MatRadioChange ( ) ;
266
- event . source = this . _selected ;
267
- event . value = this . _value ;
268
- this . change . emit ( event ) ;
266
+ this . change . emit ( new MatRadioChange ( this . _selected ! , this . _value ) ) ;
269
267
}
270
268
}
271
269
@@ -549,10 +547,7 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
549
547
550
548
/** Dispatch change event with current value. */
551
549
private _emitChangeEvent ( ) : void {
552
- const event = new MatRadioChange ( ) ;
553
- event . source = this ;
554
- event . value = this . _value ;
555
- this . change . emit ( event ) ;
550
+ this . change . emit ( new MatRadioChange ( this , this . _value ) ) ;
556
551
}
557
552
558
553
_isRippleDisabled ( ) {
0 commit comments