File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -67,11 +67,24 @@ describe('MdRadio', () => {
6767 }
6868 } ) ;
6969
70+ it ( 'should coerce the disabled binding on the radio group' , ( ) => {
71+ ( groupInstance as any ) . disabled = '' ;
72+ fixture . detectChanges ( ) ;
73+
74+ radioLabelElements [ 0 ] . click ( ) ;
75+ fixture . detectChanges ( ) ;
76+
77+ expect ( radioInstances [ 0 ] . checked ) . toBe ( false ) ;
78+ expect ( groupInstance . disabled ) . toBe ( true ) ;
79+ } ) ;
80+
7081 it ( 'should disable click interaction when the group is disabled' , ( ) => {
7182 testComponent . isGroupDisabled = true ;
7283 fixture . detectChanges ( ) ;
7384
7485 radioLabelElements [ 0 ] . click ( ) ;
86+ fixture . detectChanges ( ) ;
87+
7588 expect ( radioInstances [ 0 ] . checked ) . toBe ( false ) ;
7689 } ) ;
7790
Original file line number Diff line number Diff line change @@ -186,11 +186,11 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
186186 this . _checkSelectedRadioButton ( ) ;
187187 }
188188
189- /** Whether the radio group is diabled */
189+ /** Whether the radio group is disabled */
190190 @Input ( )
191191 get disabled ( ) { return this . _disabled ; }
192192 set disabled ( value ) {
193- this . _disabled = value ;
193+ this . _disabled = coerceBooleanProperty ( value ) ;
194194 this . _markRadiosForCheck ( ) ;
195195 }
196196
You can’t perform that action at this time.
0 commit comments