Skip to content

Commit 8027d0c

Browse files
committed
fixed group ripple disabled test
1 parent 7669489 commit 8027d0c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/lib/radio/radio.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,8 @@ describe('MdRadio', () => {
595595
[labelPosition]="labelPos"
596596
[value]="groupValue"
597597
name="test-name">
598-
<md-radio-button value="fire" [disableRipple]="disableRipple">Charmander</md-radio-button>
598+
<md-radio-button value="fire" [disableRipple]="disableRipple"
599+
[disabled]="isFirstDisabled">Charmander</md-radio-button>
599600
<md-radio-button value="water" [disableRipple]="disableRipple">Squirtle</md-radio-button>
600601
<md-radio-button value="leaf" [disableRipple]="disableRipple">Bulbasaur</md-radio-button>
601602
</md-radio-group>
@@ -604,6 +605,7 @@ describe('MdRadio', () => {
604605
class RadiosInsideRadioGroup {
605606
labelPos: 'before' | 'after';
606607
isGroupDisabled: boolean = false;
608+
isFirstDisabled: boolean = false;
607609
groupValue: string = null;
608610
disableRipple: boolean = false;
609611
}

src/lib/radio/radio.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
144144
set labelPosition(v) {
145145
this._labelPosition = (v == 'before') ? 'before' : 'after';
146146
if (this._radios) {
147-
this._radios.forEach(radio => radio.groupValueChanged());
147+
this._radios.forEach(radio => radio._groupValueChanged());
148148
}
149149
}
150150

@@ -480,7 +480,7 @@ export class MdRadioButton implements OnInit, AfterViewInit, OnDestroy {
480480
this._focusOriginMonitor.focusVia(this._inputElement.nativeElement, this._renderer, 'keyboard');
481481
}
482482

483-
groupValueChanged() {
483+
_groupValueChanged() {
484484
this._changeDetector.markForCheck();
485485
}
486486

0 commit comments

Comments
 (0)