Skip to content

Commit 79261eb

Browse files
committed
sync
1 parent 663e0b9 commit 79261eb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/lib/radio/radio.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
9191
/** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */
9292
private _labelPosition: 'before' | 'after' = 'after';
9393

94+
/** Whether the radio group is disabled. */
95+
private _disabled: boolean = false;
96+
9497
/** The method to be called in order to update ngModel */
9598
_controlValueAccessorChangeFn: (value: any) => void = (value) => {};
9699

@@ -176,6 +179,16 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
176179
this._checkSelectedRadioButton();
177180
}
178181

182+
/** Whether the radio group is diabled */
183+
@Input()
184+
get disabled() { return this._disabled; }
185+
set disabled(value) {
186+
this._disabled = value;
187+
if (this._radios) {
188+
this._radios.forEach((r) => r._groupValueChanged());
189+
}
190+
}
191+
179192
constructor(private _change: ChangeDetectorRef) {
180193
super();
181194
}
@@ -268,6 +281,7 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
268281
*/
269282
setDisabledState(isDisabled: boolean) {
270283
this.disabled = isDisabled;
284+
this._change.markForCheck();
271285
}
272286
}
273287

0 commit comments

Comments
 (0)