Assume there is a Toolbar with a splitButton that has a subItem. Both the splitButton and the subItem have clickHandlers configured. As long as the splitButton is not in the toolbar's overflow, everything is working correctly. However, when overflown, clicking on the subItem executes the clickHandler of the splitButton instead of the clickHandler of the subItem.
This behavior can be reproduced in the following DOJO: https://dojo.telerik.com/enanUKan/3. Watch the console output when clicking the splitButton/its subItem.
Two more hints:
Unfortunately, both options are no viable solution for us. Any suggestions?
Hello Michael,
Thank you for the followup. I am glad to know that the desired event handling is achieved. I am marking this request as complete.
Best regards,
Dimitar
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
I have re-tested this issue on our side with the (currently) latest version of Kendo UI (2023.1.117). I have modified our code to use the Toolbar's click event to handle all interactions and redirect them to the correct handlers using the id available in the event data.
For us, this is a great solution and it looks much cleaner than individual handlers.
From my point of view, this request can be closed.
Hello,
As a followup, currently it is possible to assign different values to different splitButton's menuButtons and check in the splitButton click handler which menuButton is the one clicked. This is shown on ToolBar Events demo.
Regards,
Dimitar
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hello,
The change in ToolBat splitButton click handler's behavior is due to fixing the following issue:
ToolBar click event for splitButton's menuButtons does not fire when the splitButton is in overflow
The issue was that when in overflow, the splitButton subitems did not fire the splitButton click handler - Dojo snippet. And after the fix the splitButton's subitems fire the splitButton click handler.
I would like to note that as commented in the issue, support for separate click handlers for splitButton subitems is not documented and although previously working, it was not intended to work.
I am converting this Bug Report to a Feature Request for adding official support for separate click handlers to splitButton subitems.
Regards,
Dimitar
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.