The Kendo UI Toolbar widget supports enabling/disabling items via the various enable options for items, splitButtons and buttonGroups or after initialization via the enable() method. In this DOJO, I have created a toolbar with a splitButton that contains several sub-items. As you can see, I have disabled the second sub-item via the options.
However, after disabling and enabling the whole splitButton, the second sub-item is no longer disabled and can be used normally although its enabled property has never been touched.
Since the "main" item of a splitButton is an item on its own that a dedicated click-action can be assigned to etc., I would not expect the enabled property to effect its sub-items.
Hello Michael,
We have examined the case in detail and now we can confirm that the current behavior of the SplitButton in a ToolBar is in line with the behavior of stand-alone SplitButton component. Using the enable() method of the SplitButton with a single boolean argument will affect all its items as described in the SplitButton API reference:
https://docs.telerik.com/kendo-ui/api/javascript/ui/splitbutton/methods/enable
You will also notice that the SplitButton enable() method allows a granular change of the state of the sub-buttons in the component. Hence, if you need to keep a particular item to be disable, you could do that by following this logic:
toolbar.enable($("#parent"), true);
let sb = $("#parent").getKendoSplitButton();
sb.enable(false, "#child2");
Regards,
Veselin Tsvetanov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Hi Michael,
Thank you for reporting the bug in question. I have just opened a GitHub issue on that in our system:
https://github.com/telerik/kendo-ui-core/issues/7206
As a small token of gratitude for reporting the above, I have updated your Telerik points.
Regards,
Veselin Tsvetanov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.