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