Completed
Last Updated: 29 Nov 2021 14:54 by ADMIN
Release 2021.R3.SP.next
Jonas
Created on: 22 Apr 2021 09:09
Category: Kendo UI for jQuery
Type: Bug Report
0
Typescript definition of JQuery data method does not include undefined

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.

3 comments
ADMIN
Veselin Tsvetanov
Posted on: 05 May 2021 10:56

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.

Jonas
Posted on: 29 Apr 2021 09:44

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.

ADMIN
Veselin Tsvetanov
Posted on: 29 Apr 2021 09:19

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.