The Typescript definitions for Kendo UI define the kendo.ui.ToolBarOpenEvent as follows:
interface ToolBarEvent {
sender: ToolBar;
preventDefault: Function;
isDefaultPrevented(): boolean;
}
interface ToolBarOpenEvent extends ToolBarEvent {
SplitButton?: JQuery | undefined;
}The event is also documented that way in https://docs.telerik.com/kendo-ui/api/javascript/ui/toolbar/events/open. However, the corrersponding method in kendo-toolbar.js:446-453 does the following:
open: function (e) {
var isDefaultPrevented = that.toolbar.trigger(OPEN, { target: element });
if (isDefaultPrevented) {
e.preventDefault();
return;
}
that.adjustPopupWidth(e.sender);
},Hi Michael,
Below you will find a comment in GitHub that describes the reason for closing the issue:
- https://github.com/telerik/kendo-ui-core/issues/6651#issuecomment-2890971875
However, you are indeed correct that the typescript definition does not match the description in the API. Thank you for pointing that. The current TypeScript definition for ToolBarOpenEvent uses a SplitButton property, but the actual implementation uses a widget property. I will update the ToolBarOpenEvent in the kendo.all.d.ts as follows, so the widget is returned:
interface ToolBarOpenEvent extends ToolBarEvent {
widget?: JQuery | undefined;
}To resolve this locally until the official typings are updated, you can modify the interface in your own TypeScript codebase as demonstrated above.
Thank you once again for the report.
I remain at your disposal should you have any additional questions on the matter.Regards,
Neli
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.
This ticket has been marked as completed. While implementation and configuration now match, the typescript typings are still unchanged and therefore wrong.
Typescript:
interface ToolBarEvent {
sender: ToolBar;
preventDefault: Function;
isDefaultPrevented(): boolean;
}
interface ToolBarOpenEvent extends ToolBarEvent {
SplitButton?: JQuery | undefined;
}
Actual implementation (kendo-toolbar.js:1845-1849):
}
Please reopen.
Hi Michael,
The bug is not yet scheduled for fixing. I would suggest following the thread, thus you will be notified once its status is updated.
Regards,
Neli
Progress Telerik
Hi Michael,
Thank you for reporting this issue. I have also logged an issue in our public repository and you can track the progress on the item also via the issue lined below:
- https://github.com/telerik/kendo-ui-core/issues/6651
As a token of gratitude for reporting this issue, I have updated your Telerik points.
Regards,
Neli
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.