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

Having different custom items in the Drawer

1 Answer 116 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kalin
Top achievements
Rank 1
Kalin asked on 01 Apr 2021, 01:24 PM

I have looked at the examples given here https://www.telerik.com/kendo-react-ui/components/layout/drawer/custom_rendering/

Howerver as far as I can see this changes all items to have the same custom rendering. Would it be possible to have item specific renderings apart from the general custom rendering for all items?

1 Answer, 1 is accepted

Sort by
0
Accepted
Krissy
Telerik team
answered on 02 Apr 2021, 07:40 AM

Hi Kalin, 

Yes, this can be achieved by using conditional statements that render specific elements. For example, if the item's text prop is "Paris", an additional span element is rendered inside the Drawer Item.

I've created na example to showcase how this can be done: 
https://stackblitz.com/edit/react-drawer-item-custom?file=app/DrawerContainer.jsx 

Hope this is helpful.

Regards,
Krissy
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Kalin
Top achievements
Rank 1
Answers by
Krissy
Telerik team
Share this question
or