Hello,
in the Typescript bindings, the JQuery $("...").data("kendoXXX") Methods do not include undefined in there return values.
https://docs.telerik.com/kendo-ui/intro/widget-basics/jquery-initialization#duplicate-initialization
-> in the second script section, it is also documented that it can return undefined, when there is no widget instance found.
It also returns undefined, when the selector doesn't match any element.
Please include undefined in the return values.
Hello Jonas,
thank you for the further information provided. You are perfectly right that extending the return type to include undefined would force developers to use the data() method in a safer manner.
Keep tracking the current thread as it will be updated according to the bug fix development.
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.
Thank you.
It is not an error produced by calling the data() method, but rather of the return type definition.
I have attached 2 screenshots from a real-life example, that should explain the problem here.
Hello Jonas,
I have just approved your Bug report. As a small token of gratitude for reporting the above, I have also updated your Telerik points.
Just to clarify the issue faced in a real-life scenario. Do you face any errors while using the Kendo jQuery.data() method?
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.