File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ describe('MdRadio', () => {
242242 let rippleElement = radioNativeElements [ 0 ] . querySelector ( '[md-ripple]' ) ;
243243 expect ( rippleElement ) . toBeTruthy ( 'Expected an enabled radio button to have a ripple' ) ;
244244
245- radioInstances [ 0 ] . disabled = true ;
245+ testComponent . isFirstDisabled = true ;
246246 fixture . detectChanges ( ) ;
247247
248248 rippleElement = radioNativeElements [ 0 ] . querySelector ( '[md-ripple]' ) ;
@@ -591,7 +591,8 @@ describe('MdRadio', () => {
591591 [labelPosition]="labelPos"
592592 [value]="groupValue"
593593 name="test-name">
594- <md-radio-button value="fire" [disableRipple]="disableRipple">Charmander</md-radio-button>
594+ <md-radio-button value="fire" [disableRipple]="disableRipple"
595+ [disabled]="isFirstDisabled">Charmander</md-radio-button>
595596 <md-radio-button value="water" [disableRipple]="disableRipple">Squirtle</md-radio-button>
596597 <md-radio-button value="leaf" [disableRipple]="disableRipple">Bulbasaur</md-radio-button>
597598 </md-radio-group>
@@ -600,6 +601,7 @@ describe('MdRadio', () => {
600601class RadiosInsideRadioGroup {
601602 labelPos : 'before' | 'after' ;
602603 isGroupDisabled : boolean = false ;
604+ isFirstDisabled : boolean = false ;
603605 groupValue : string = null ;
604606 disableRipple : boolean = false ;
605607}
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor {
139139 set labelPosition ( v ) {
140140 this . _labelPosition = ( v == 'before' ) ? 'before' : 'after' ;
141141 if ( this . _radios ) {
142- this . _radios . forEach ( radio => radio . groupValueChanged ( ) ) ;
142+ this . _radios . forEach ( radio => radio . _groupValueChanged ( ) ) ;
143143 }
144144 }
145145
@@ -150,7 +150,7 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor {
150150 // The presence of *any* disabled value makes the component disabled, *except* for false.
151151 this . _disabled = ( value != null && value !== false ) ? true : null ;
152152 if ( this . _radios ) {
153- this . _radios . forEach ( radio => radio . groupValueChanged ( ) ) ;
153+ this . _radios . forEach ( radio => radio . _groupValueChanged ( ) ) ;
154154 }
155155 }
156156
@@ -446,7 +446,7 @@ export class MdRadioButton implements OnInit {
446446 this . _disabled = ( value != null && value !== false ) ? true : null ;
447447 }
448448
449- groupValueChanged ( ) {
449+ _groupValueChanged ( ) {
450450 this . _changeDetector . markForCheck ( ) ;
451451 }
452452
You can’t perform that action at this time.
0 commit comments