Provide an example of the children in Drawer component

6 posts, 0 answers
  1. Vinod
    Vinod avatar
    13 posts
    Member since:
    Aug 2019

    Posted 04 Feb 2020 Link to this post

    Hi, 

    Please provide an example of the Drawer component having children props set

    Thanks 

  2. Stefan
    Admin
    Stefan avatar
    3008 posts

    Posted 04 Feb 2020 Link to this post

    Hello, Tony,

    This can be done, by rendering the elements directly inside the DrawerNavigation component:

    https://www.telerik.com/kendo-react-ui/components/layout/api/DrawerNavigation/

    Please let me know if you need more information on this matter.

    Regards,
    Stefan
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Vinod
    Vinod avatar
    13 posts
    Member since:
    Aug 2019

    Posted 04 Feb 2020 Link to this post

    Stefan, 

    I should be able to pass JSON having children props and render it on Drawer. 

    const items = [
        { text: 'Inbox', icon: 'k-i-inbox', selected: true , route: '/', children: [{
    { text: 'Inbox', icon: 'k-i-inbox', selected: true , route: '/', children: [] },
    { text: 'Inbox', icon: 'k-i-inbox', selected: true , route: '/', children: [] },
    { text: 'Inbox', icon: 'k-i-inbox', selected: true , route: '/' , children: []}
    }] },
        { separator: true },
        { text: 'Notifications', icon: 'k-i-bell', route: '/notifications', children: [] },
        { text: 'Calendar', icon: 'k-i-calendar', route: '/calendar', children: [] }
    ];

     

    Could you provide an example working with above JSON. 

  4. Stefan
    Admin
    Stefan avatar
    3008 posts

    Posted 05 Feb 2020 Link to this post

    Hello, Tony,

    Thank you for the clarification.

    The children property in the API refers to the children element/s of a component which is a commonly used word in React:

    https://reactjs.org/docs/composition-vs-inheritance.html

    Where based on the provided code, it seems you are looking to a property that will make the Drawer renders hierarchical elements. This is something the team is working on and I can suggest monitoring this item for updates:

    https://feedback.telerik.com/kendo-react-ui/1450862-kendoreact-drawer-component

    Regards,
    Stefan
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Vinod
    Vinod avatar
    13 posts
    Member since:
    Aug 2019

    Posted 17 Feb 2020 Link to this post

    Hi Stefan, 

    Please let us know the progress you make on getting the Hierarchical data rendered on the Drawer component using the 'children' property. 

     

    Thanks, Vinod

  6. Stefan
    Admin
    Stefan avatar
    3008 posts

    Posted 17 Feb 2020 Link to this post

    Hello, Vinod,

    This is already available in the dev channel.

    Please take a look at the documentation for it

    https://www.telerik.com/kendo-react-ui-develop/components/layout/drawer/custom_rendering/#toc-hierarchical-drawer

    Regards,
    Stefan
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top