File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
91
91
/** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */
92
92
private _labelPosition : 'before' | 'after' = 'after' ;
93
93
94
+ /** Whether the radio group is disabled. */
95
+ private _disabled : boolean = false ;
96
+
94
97
/** The method to be called in order to update ngModel */
95
98
_controlValueAccessorChangeFn : ( value : any ) => void = ( value ) => { } ;
96
99
@@ -176,6 +179,16 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
176
179
this . _checkSelectedRadioButton ( ) ;
177
180
}
178
181
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
+
179
192
constructor ( private _change : ChangeDetectorRef ) {
180
193
super ( ) ;
181
194
}
@@ -268,6 +281,7 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
268
281
*/
269
282
setDisabledState ( isDisabled : boolean ) {
270
283
this . disabled = isDisabled ;
284
+ this . _change . markForCheck ( ) ;
271
285
}
272
286
}
273
287
You can’t perform that action at this time.
0 commit comments