Detect Current State of Drawer

4 posts, 1 answers
  1. Ryan
    Ryan avatar
    7 posts
    Member since:
    Aug 2012

    Posted 14 Nov 2014 Link to this post

    Is there a way to check the current state of a kendoMobileDrawer to determine if the drawer is open or closed via a field or method on the object? If not - what's the recommended approach for determining this?
  2. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 17 Nov 2014 Link to this post

    Hello Ryan,

    You can use the visible property of the Drawer object reference, that will tell you whether the drawer is visible or not. Here is the code that you can use:

    $('[data-role=drawer]').getKendoMobileDrawer().visible //will return boolean proerty

    I hope this information helps.

    Regards,
    Kiril Nikolov
    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. Ryan
    Ryan avatar
    7 posts
    Member since:
    Aug 2012

    Posted 18 Nov 2014 in reply to Kiril Nikolov Link to this post

    Perfect. That's what I needed - thank you. You may want to consider adding that information to your API documentation: http://docs.telerik.com/kendo-ui/api/javascript/mobile/ui/drawer.
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 19 Nov 2014 Link to this post

    Hello Ryan,

    Good point!

    Just added it here:

    http://docs.telerik.com/kendo-ui/api/javascript/mobile/ui/drawer#fields

    Regards,
    Kiril Nikolov
    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