diff --git a/src/lib/radio/radio.spec.ts b/src/lib/radio/radio.spec.ts index 591cf418fd38..7d82e1c7e9c1 100644 --- a/src/lib/radio/radio.spec.ts +++ b/src/lib/radio/radio.spec.ts @@ -242,7 +242,7 @@ describe('MdRadio', () => { let rippleElement = radioNativeElements[0].querySelector('[md-ripple]'); expect(rippleElement).toBeTruthy('Expected an enabled radio button to have a ripple'); - radioInstances[0].disabled = true; + testComponent.isFirstDisabled = true; fixture.detectChanges(); rippleElement = radioNativeElements[0].querySelector('[md-ripple]'); @@ -591,7 +591,8 @@ describe('MdRadio', () => { [labelPosition]="labelPos" [value]="groupValue" name="test-name"> - Charmander + Charmander Squirtle Bulbasaur @@ -600,6 +601,7 @@ describe('MdRadio', () => { class RadiosInsideRadioGroup { labelPos: 'before' | 'after'; isGroupDisabled: boolean = false; + isFirstDisabled: boolean = false; groupValue: string = null; disableRipple: boolean = false; } diff --git a/src/lib/radio/radio.ts b/src/lib/radio/radio.ts index e1a45a62ae40..d47e8468f945 100644 --- a/src/lib/radio/radio.ts +++ b/src/lib/radio/radio.ts @@ -139,7 +139,7 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor { set labelPosition(v) { this._labelPosition = (v == 'before') ? 'before' : 'after'; if (this._radios) { - this._radios.forEach(radio => radio.groupValueChanged()); + this._radios.forEach(radio => radio._groupValueChanged()); } } @@ -150,7 +150,7 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor { // The presence of *any* disabled value makes the component disabled, *except* for false. this._disabled = (value != null && value !== false) ? true : null; if (this._radios) { - this._radios.forEach(radio => radio.groupValueChanged()); + this._radios.forEach(radio => radio._groupValueChanged()); } } @@ -446,7 +446,7 @@ export class MdRadioButton implements OnInit { this._disabled = (value != null && value !== false) ? true : null; } - groupValueChanged() { + _groupValueChanged() { this._changeDetector.markForCheck(); }