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

Grid.Pager.Page() parameter typed as a boolean

7 Answers 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 2
Ben asked on 05 Nov 2015, 01:18 PM

http://docs.telerik.com/kendo-ui/api/javascript/ui/pager#methods-page

The example source code calls pager.page with the value 2 but the data type says this parameter should be a boolean. I am assuming this is incorrect?

Thanks

7 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 09 Nov 2015, 09:34 AM

Hello Ben,

 

Indeed this is a mistake. The type of the parameter is always Number. We will fix the documentation.

 

Thank you for bringing this to our attention.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ben
Top achievements
Rank 2
answered on 09 Nov 2015, 10:37 AM

Thanks :)

I have submitted a fix for the typescript typings, awaiting review. https://github.com/DefinitelyTyped/DefinitelyTyped/pull/6685

0
Nikolay Rusev
Telerik team
answered on 11 Nov 2015, 07:34 AM

Hello Ben,

 

That particular part of the TypeScript type definition is automatically generated from the docs and updating the docs will update the type definition file as well, which we already did. There is Q3 2015 SP1 coming this week which will include updated TypeScript definitions.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ben
Top achievements
Rank 2
answered on 12 Nov 2015, 11:47 AM

Okay Thanks Nikolay

I have had another typings issue and figure I will mention it here.

http://docs.telerik.com/kendo-ui/api/javascript/ui/contextmenu#methods-open

This method accepts either (number, number), (JQuery) or (Element). Unfortunatly the typings are defined as follows:

open(x: number, y: number): kendo.ui.ContextMenu;
open(x: Element, y: number): kendo.ui.ContextMenu;
open(x: JQuery, y: number): kendo.ui.ContextMenu;

For my typescript to compile while passing a JQuery object I am having to pass undefined as the second parameter.

0
Accepted
Nikolay Rusev
Telerik team
answered on 16 Nov 2015, 09:22 AM

Hello Ben,

 

Thanks for the report. I've marked the second paramter as optional which will result in correct TypeScript definition for the method.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Alexander
Top achievements
Rank 1
answered on 12 Jan 2016, 09:52 PM
I believe the Pager.Page(page) parameter should also be optional?
0
Nikolay Rusev
Telerik team
answered on 14 Jan 2016, 11:22 AM

Hello Alexander,

 

Indeed you are right. We will address this.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Ben
Top achievements
Rank 2
Answers by
Nikolay Rusev
Telerik team
Ben
Top achievements
Rank 2
Alexander
Top achievements
Rank 1
Share this question
or