kendo-angular
kendo-angular copied to clipboard
[Grid] [TreeList] Component events are triggered on cell button click
Describe the bug
Clicking a Kendo Angular Button or kendoGridRemoveCommand
(kendoTreeListRemoveCommand
) button, defined in kendoGridCellTemplate
(respectively kendoTreeListCellTemplate
) triggers component events - cellClick
, selectionChange
, seletedKeysChange
.
The events are emitted only when clicking the text of the button (inner span element with class="k-button-text"
). Clicking the surrounding area of the text (highlighted below) triggers only the click
event of the button:
To Reproduce Open the console and click the Test or Remove button Grid - https://stackblitz.com/edit/angular-vjjkzx TreeList - https://stackblitz.com/edit/angular-5axwa3
Expected behavior
The custom buttons should not trigger other component events just click
event.
Workaround Stopping the click event's propagation will prevent other Grid events from emitting: https://stackblitz.com/edit/angular-vjjkzx-x6ajgo?file=src%2Fapp%2Fapp.component.ts