This is a migrated thread and some comments may be shown as answers.

Missing TypeScript properties in Schedule (resources) and SchedulerView (name) kendoui.for.jquery.2017.3.1102

3 Answers 122 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Yosel
Top achievements
Rank 1
Yosel asked on 11 Nov 2017, 09:13 PM

Dear Telerik Team

...working with kendoui.for.jquery.2017.3.1102 I realized that Scheduler and SchedulerView are missing some properties in TypeScript. I added them to "kendo.all.d.ts" and now is working properly. I now you generate ts automatically. I found this issue while add/remove groups at run time based on your JavaScript samples...

...

var scheduler = $("#scheduler").data("kendoScheduler");

scheduler.resources[0].dataSource.filter(filter);

scheduler.view(scheduler.view().name); //refresh the current view  

...

 

in kendo.all.d.ts

 class Scheduler extends kendo.ui.Widget {

(...)

 resources?: SchedulerResource[]; //missing

}

 interface SchedulerView {

(...

name?: string; //missing

}

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 14 Nov 2017, 01:15 PM

Hello Yosel,

Thanks for noticing. I logged a GitHub issue on the topic and soon the properties mentioned should be included. Note that it is possible that the resources field to be of type Array and you might need to cast it in your code. You can monitor the task from here: https://github.com/telerik/kendo-ui-core/issues/3762

Regards,
Ianko
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Yosel
Top achievements
Rank 1
answered on 14 Nov 2017, 08:52 PM

Thank you for your quick response. In RangeSlider it seems that is another issue...value instead of values when passing to numbers.

class RangeSlider extends kendo.ui.Widget {

(...)

 value(selectionStart: number, selectionEnd: number): void; //value without the s does not work.

replaced by...

 values(selectionStart: number, selectionEnd: number): void;

...and it started working.

 

 

0
Ianko
Telerik team
answered on 15 Nov 2017, 09:16 AM

Hello Yosel,

Yes, it seems the API documented does not explains best the way the value method works. 

value method accepts an array of two numbers—start and end, e.g., rangeSlider.value([1,5]).

values method accents both array as the value method and two parameters with start and end, e.g.,  rangeSlider.values(1,5).

I am updating the API documented, which will also impact the TS definitions as well.

Regards,
Ianko
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Integration with other JS libraries
Asked by
Yosel
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Yosel
Top achievements
Rank 1
Share this question
or