What is the replacement in Kendo React for optionLabel in Kendo jQuery DropDownList component?

1 Answer 79 Views
DropDownList
nodsec
Top achievements
Rank 1
Iron
Iron
nodsec asked on 22 Oct 2022, 06:05 AM

I need to add an empty first item in Kendo DropDownList component. I don't know, how to make it in Kendo React. In Kendo jQuery I was able to set optionLabel: "" property and It worked. I don't know, how to do the same in Kendo React dropdown.

jQuery example: https://demos.telerik.com/kendo-ui/dropdownlist/index

Thanks a lot.

1 Answer, 1 is accepted

Sort by
1
Accepted
Vessy
Telerik team
answered on 25 Oct 2022, 05:00 PM

Hello,

In KendoReact the target result can be achieved by configuring the `defaultItem` of the component:

For convenience, I have prepared a small sample demonstrating this approach, you can test it here:

Regards,
Vessy
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
DropDownList
Asked by
nodsec
Top achievements
Rank 1
Iron
Iron
Answers by
Vessy
Telerik team
Share this question
or