DropDownTree label

1 Answer 79 Views
Wrappers for React
Andrei
Top achievements
Rank 1
Iron
Iron
Iron
Andrei asked on 03 Nov 2021, 03:41 PM | edited on 04 Nov 2021, 08:25 AM

Hello, I am using KendoReact DropDownTree component for my form and i want to create a label for it so when i do click on the label DropDownTree opens,

i've tried to implement it in the same way as it is done for dropdownlist

DropDownWrapper:

but it doesn't work for me, when i click on the label it just focuses DropDownTree but doesn't open it, what am i doing wrong?

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 05 Nov 2021, 07:28 AM

Hi, Andrei,

Currently, the DropDownTree component cannot be used with the Label component in that manner. However, it is possible to achieve the desired functionality by setting up an onClick function that controls the opened/closed state of the DropDownTree with the onOpen and the onClose events.  Please review the following runnable example:

https://stackblitz.com/edit/react-htoi8z-lokfn2?file=app/main.jsx

Regards, Philip 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
Wrappers for React
Asked by
Andrei
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Filip
Telerik team
Share this question
or