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

How to navigate with treeview

I am using nodeTemplate on treeview to load my custom component but I can't attach a click handler or link to the treeview rows. I am using treeview as a way to make a 'list drag and drop-able' so I can reorder the items or move them into other trees. My component is using withRouter from react-router to handle routing. How would I make individual treeview elements route to different urls on click?


1 Reply

SI Silambarasan I Syncfusion Team February 21, 2019 05:56 PM UTC

Hi Ryan, 
 
Thank you for contacting Syncfusion support. 
 
We have looked into your reported query and we have prepared a sample that demonstrate the requirement “To make individual treeview elements route to different urls on click using nodeTemplate” in EJ2 TreeView. In our TreeView component, we have disabled the pointer events for tree node full row element. Your reported problem can be resolved by manually setting the pointer events to the text content.  
 
Please refer the sample from the below link. 
 
 
.e-treeview .e-list-text{ 
pointer-events: auto; 
} 
 
 
 
Could you please check the above sample and get back to us if your requirement is not fulfilled or need further assistance? 
 
Regards, 
Silambarasan 


Loader.
Live Chat Icon For mobile
Up arrow icon