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 @@ -243,7 +243,7 @@ describe('MdRadio', () => {
243
243
let rippleElement = radioNativeElements [ 0 ] . querySelector ( '[md-ripple]' ) ;
244
244
expect ( rippleElement ) . toBeTruthy ( 'Expected an enabled radio button to have a ripple' ) ;
245
245
246
- radioInstances [ 0 ] . disabled = true ;
246
+ testComponent . isFirstDisabled = true ;
247
247
fixture . detectChanges ( ) ;
248
248
249
249
rippleElement = radioNativeElements [ 0 ] . querySelector ( '[md-ripple]' ) ;
@@ -592,7 +592,8 @@ describe('MdRadio', () => {
592
592
[labelPosition]="labelPos"
593
593
[value]="groupValue"
594
594
name="test-name">
595
- <md-radio-button value="fire" [disableRipple]="disableRipple">Charmander</md-radio-button>
595
+ <md-radio-button value="fire" [disableRipple]="disableRipple"
596
+ [disabled]="isFirstDisabled">Charmander</md-radio-button>
596
597
<md-radio-button value="water" [disableRipple]="disableRipple">Squirtle</md-radio-button>
597
598
<md-radio-button value="leaf" [disableRipple]="disableRipple">Bulbasaur</md-radio-button>
598
599
</md-radio-group>
@@ -601,6 +602,7 @@ describe('MdRadio', () => {
601
602
class RadiosInsideRadioGroup {
602
603
labelPos : 'before' | 'after' ;
603
604
isGroupDisabled : boolean = false ;
605
+ isFirstDisabled : boolean = false ;
604
606
groupValue : string = null ;
605
607
disableRipple : boolean = false ;
606
608
}
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor {
140
140
set labelPosition ( v ) {
141
141
this . _labelPosition = ( v == 'before' ) ? 'before' : 'after' ;
142
142
if ( this . _radios ) {
143
- this . _radios . forEach ( radio => radio . groupValueChanged ( ) ) ;
143
+ this . _radios . forEach ( radio => radio . _groupValueChanged ( ) ) ;
144
144
}
145
145
}
146
146
@@ -151,7 +151,7 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor {
151
151
// The presence of *any* disabled value makes the component disabled, *except* for false.
152
152
this . _disabled = ( value != null && value !== false ) ? true : null ;
153
153
if ( this . _radios ) {
154
- this . _radios . forEach ( radio => radio . groupValueChanged ( ) ) ;
154
+ this . _radios . forEach ( radio => radio . _groupValueChanged ( ) ) ;
155
155
}
156
156
}
157
157
@@ -450,7 +450,7 @@ export class MdRadioButton implements OnInit {
450
450
this . _disabled = ( value != null && value !== false ) ? true : null ;
451
451
}
452
452
453
- groupValueChanged ( ) {
453
+ _groupValueChanged ( ) {
454
454
this . _changeDetector . markForCheck ( ) ;
455
455
}
456
456
You can’t perform that action at this time.
0 commit comments