File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -44,4 +44,3 @@ <h1>md-checkbox: Basic Example</h1>
44
44
</ div >
45
45
46
46
< h1 > Nested Checklist</ h1 >
47
- < md-checkbox-demo-nested-checklist > </ md-checkbox-demo-nested-checklist >
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ export class MdCheckbox implements ControlValueAccessor {
148
148
@Output ( ) change : EventEmitter < MdCheckboxChange > = new EventEmitter < MdCheckboxChange > ( ) ;
149
149
150
150
/** Event emitted when the checkbox's `indeterminate` value changes. */
151
- @Output ( ) indeterminateChange : EventEmitter < Boolean > = new EventEmitter < Boolean > ( ) ;
151
+ @Output ( ) indeterminateChange : EventEmitter < boolean > = new EventEmitter < boolean > ( ) ;
152
152
153
153
/** The native `<input type="checkbox"> element */
154
154
@ViewChild ( 'input' ) _inputElement : ElementRef ;
@@ -214,14 +214,17 @@ export class MdCheckbox implements ControlValueAccessor {
214
214
}
215
215
216
216
set indeterminate ( indeterminate : boolean ) {
217
+ let changed = indeterminate != this . _indeterminate ;
217
218
this . _indeterminate = indeterminate ;
218
219
if ( this . _indeterminate ) {
219
220
this . _transitionCheckState ( TransitionCheckState . Indeterminate ) ;
220
221
} else {
221
222
this . _transitionCheckState (
222
223
this . checked ? TransitionCheckState . Checked : TransitionCheckState . Unchecked ) ;
223
224
}
224
- this . indeterminateChange . emit ( this . _indeterminate ) ;
225
+ if ( changed ) {
226
+ this . indeterminateChange . emit ( this . _indeterminate ) ;
227
+ }
225
228
}
226
229
227
230
/** The color of the button. Can be `primary`, `accent`, or `warn`. */
You can’t perform that action at this time.
0 commit comments