File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -384,11 +384,11 @@ describe('MdCheckbox', () => {
384384
385385 describe ( 'state transition css classes' , ( ) => {
386386 it ( 'should transition unchecked -> checked -> unchecked' , ( ) => {
387- testComponent . isChecked = true ;
387+ inputElement . click ( ) ;
388388 fixture . detectChanges ( ) ;
389389 expect ( checkboxNativeElement . classList ) . toContain ( 'mat-checkbox-anim-unchecked-checked' ) ;
390390
391- testComponent . isChecked = false ;
391+ inputElement . click ( ) ;
392392 fixture . detectChanges ( ) ;
393393 expect ( checkboxNativeElement . classList )
394394 . not . toContain ( 'mat-checkbox-anim-unchecked-checked' ) ;
Original file line number Diff line number Diff line change @@ -195,8 +195,6 @@ export class MdCheckbox implements ControlValueAccessor {
195195 this . indeterminateChange . emit ( this . _indeterminate ) ;
196196 }
197197 this . _checked = checked ;
198- this . _transitionCheckState (
199- this . _checked ? TransitionCheckState . Checked : TransitionCheckState . Unchecked ) ;
200198 this . _changeDetectorRef . markForCheck ( ) ;
201199 }
202200 }
@@ -348,6 +346,8 @@ export class MdCheckbox implements ControlValueAccessor {
348346
349347 if ( ! this . disabled ) {
350348 this . toggle ( ) ;
349+ this . _transitionCheckState (
350+ this . _checked ? TransitionCheckState . Checked : TransitionCheckState . Unchecked ) ;
351351
352352 // Emit our custom change event if the native input emitted one.
353353 // It is important to only emit it, if the native input triggered one, because
You can’t perform that action at this time.
0 commit comments