diff --git a/src/lib/button-toggle/button-toggle.spec.ts b/src/lib/button-toggle/button-toggle.spec.ts index 76c025410f69..b2f200377863 100644 --- a/src/lib/button-toggle/button-toggle.spec.ts +++ b/src/lib/button-toggle/button-toggle.spec.ts @@ -345,9 +345,8 @@ describe('MatButtonToggle without forms', () => { fixture.detectChanges(); tick(); - // The default browser behavior is to not emit a change event, when the value was set - // to false. That's because the current input type is set to `radio` - expect(changeSpy).toHaveBeenCalledTimes(1); + // Always emit change event when button toggle is clicked + expect(changeSpy).toHaveBeenCalledTimes(2); })); it('should emit a change event from the button toggle group', fakeAsync(() => { diff --git a/src/lib/button-toggle/button-toggle.ts b/src/lib/button-toggle/button-toggle.ts index b1b4ab0f0974..1d3f5adaa789 100644 --- a/src/lib/button-toggle/button-toggle.ts +++ b/src/lib/button-toggle/button-toggle.ts @@ -447,10 +447,9 @@ export class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit this.buttonToggleGroup._syncButtonToggle(this, this._checked, true); this.buttonToggleGroup._onTouched(); } - - // Emit a change event when the native button does. - this.change.emit(new MatButtonToggleChange(this, this.value)); } + // Emit a change event when it's the single selector + this.change.emit(new MatButtonToggleChange(this, this.value)); } /**