We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to open different component when clicking on each node of treeview insode sidenav control

Thread ID:





146701 Aug 14,2019 05:13 PM UTC Aug 15,2019 01:04 PM UTC React - EJ 2 1
Tags: Sidebar
Asked On August 14, 2019 05:13 PM UTC

We have a SideNav and within that we have a treeview, now we are going to show different components on the right side of sidenav when user clicks on each node.

We tried to use template and within that use <Link> but unfortunately it doesn't work .

Would you please advice how this is achievable and please provide a sample if possible?

Thanks in advance 

Ashokkumar Balasubramanian [Syncfusion]
Replied On August 15, 2019 01:04 PM UTC

Hello Afshin, 
Good day to you. 
For this use case, you can use our NavigateUrl attribute of fields property to store the corresponding component details and using nodeSelected event to display the corresponding content in Right Side panel of SideBar. Please refer the below code block and sample. 
this.dataList = [{ 
        "nodeId": "00", 
        "nodeText": "Overview", 
        "icon": "icon icon-dashboard", 
        "expanded": false, 
        "enabled": true, 
        "selected": false, 
        "navigateUrl": "https://account.teamyell.nl", 
        "tooltip": null, 
        "nodeChild": null 
    onSelect(args) { 
        var data = this.treeObj.getTreeData(args.node); 
        //Based on your requirement get the details on nodeSelect event and display on Right Side 
        document.querySelector('.textArea').textContent = data[0].navigateUrl; 
Please check the sample and get back to us, if you require any further assistance on this. 
Ashokkumar B. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon