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

8 posts, 1 answers
  1. Ben
    Ben avatar
    10 posts
    Member since:
    Oct 2015

    Posted 05 Nov 2015 Link to this post

    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

  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 09 Nov 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Ben
    Ben avatar
    10 posts
    Member since:
    Oct 2015

    Posted 09 Nov 2015 in reply to Nikolay Rusev Link to this post

    Thanks :)

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

  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 11 Nov 2015 Link to this post

    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!
     
  6. Ben
    Ben avatar
    10 posts
    Member since:
    Oct 2015

    Posted 12 Nov 2015 Link to this post

    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.

  7. Answer
    Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 16 Nov 2015 Link to this post

    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!
     
  8. Alexander
    Alexander avatar
    19 posts
    Member since:
    Jun 2012

    Posted 12 Jan in reply to Nikolay Rusev Link to this post

    I believe the Pager.Page(page) parameter should also be optional?
  9. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 14 Jan Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready