fix(button-toggle): allow event bubbling for toggle button clicks (#11951)

This commit is contained in:
Joey Perrott
2018-06-28 14:12:02 -07:00
committed by GitHub
parent 8280a76c6e
commit 5e16682630
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
[attr.name]="name || null"
[attr.aria-label]="ariaLabel"
[attr.aria-labelledby]="ariaLabelledby"
(click)="_onButtonClick($event)">
(click)="_onButtonClick()">
<div class="mat-button-toggle-label-content">
<ng-content></ng-content>
</div>
+1 -3
View File
@@ -436,9 +436,7 @@ export class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit
}
/** Checks the button toggle due to an interaction with the underlying native button. */
_onButtonClick(event: Event) {
event.stopPropagation();
_onButtonClick() {
const newChecked = this._isSingleSelector ? true : !this._checked;
if (newChecked !== this._checked) {