kendo-angular icon indicating copy to clipboard operation
kendo-angular copied to clipboard

[Grid] [TreeList] Component events are triggered on cell button click

Open mbechev opened this issue 1 year ago • 1 comments

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:

image

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.

mbechev avatar Feb 07 '24 12:02 mbechev

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

slavenai avatar Feb 15 '24 08:02 slavenai