File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -215,13 +215,14 @@ export class MdCheckbox implements ControlValueAccessor {
215
215
set indeterminate ( indeterminate : boolean ) {
216
216
let changed = indeterminate != this . _indeterminate ;
217
217
this . _indeterminate = indeterminate ;
218
- if ( this . _indeterminate ) {
219
- this . _transitionCheckState ( TransitionCheckState . Indeterminate ) ;
220
- } else {
221
- this . _transitionCheckState (
222
- this . checked ? TransitionCheckState . Checked : TransitionCheckState . Unchecked ) ;
223
- }
218
+
224
219
if ( changed ) {
220
+ if ( this . _indeterminate ) {
221
+ this . _transitionCheckState ( TransitionCheckState . Indeterminate ) ;
222
+ } else {
223
+ this . _transitionCheckState (
224
+ this . checked ? TransitionCheckState . Checked : TransitionCheckState . Unchecked ) ;
225
+ }
225
226
this . indeterminateChange . emit ( this . _indeterminate ) ;
226
227
}
227
228
}
@@ -379,6 +380,8 @@ export class MdCheckbox implements ControlValueAccessor {
379
380
// [checked] bound to it.
380
381
if ( newState === TransitionCheckState . Checked ) {
381
382
animSuffix = 'unchecked-checked' ;
383
+ } else if ( newState == TransitionCheckState . Indeterminate ) {
384
+ animSuffix = 'unchecked-indeterminate' ;
382
385
} else {
383
386
return '' ;
384
387
}
You can’t perform that action at this time.
0 commit comments