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

Is there a React Component for DropDownTree View?

4 Answers 181 Views
Wrappers for React
This is a migrated thread and some comments may be shown as answers.
Mukesh
Top achievements
Rank 1
Mukesh asked on 19 Dec 2018, 08:53 AM
I have got a task of displaying a TreeView inside a dropdown. How should I approach it. Can I put a TreeView component inside a dropdown.

4 Answers, 1 is accepted

Sort by
0
Asen Arizanov
Telerik team
answered on 20 Dec 2018, 09:00 AM
Hi Mukesh,

There is no DropDownTree component. To customize the DropDownList items you can use templates. You can try adding a TreeView via a template.

Asen Arizanov
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
0
Mukesh
Top achievements
Rank 1
answered on 01 Feb 2019, 12:50 PM

Hi Asen,

I went through the templates page and was trying to add a TreeListDataSource to the DropDownList dataSource. Is this right? Could you share some example of how to add a TreeView via a template.

0
Stefan
Telerik team
answered on 04 Feb 2019, 07:48 AM
Hello, Mukesh,

Currently, as the DropDownTree is not available as a native React component we can suggest two options:

1) Making a hybrid component by combining the KendoReact MultiSelect and placing a KendoReact TreeView inside its custom render item. As this is a very custom approach it will require additional code to handle the selection of new items and updating the selection. I made an example that demonstrates how this can be made, but it will require additional modifications if you decide to go with it:

https://stackblitz.com/edit/react-fmkzst?file=app/main.js

2) Our jQuery version has a DropDownTree component which can be used in a React application:

https://stackblitz.com/edit/react-yhju2c?file=app/main.js

As we encourage using the native components as they have better integration with React, I can suggest making a feature request for the DropDownTree native component:

https://feedback.telerik.com/kendo-react-ui

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
0
Mukesh
Top achievements
Rank 1
answered on 04 Feb 2019, 12:05 PM

Thank You for the prompt reply...

Will try the modifications very soon... And yes will definitely make request/vote for DropDownTree feature which would be great to have.

Thanks Again

Tags
Wrappers for React
Asked by
Mukesh
Top achievements
Rank 1
Answers by
Asen Arizanov
Telerik team
Mukesh
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or