Treeview structure spfx

Visitor

Hello, i am new to React Js. I have to create a web part to fetch data from sp list and display in the form of circles. Depending on hierarchy, defined on the list I have to show them so that when someone clicks, next level items are displayed. Can someone point me into correct direction? Thanks in advance.

 

1 Reply

@vaibhavk665 For SharePoint list interaction, it can be done with REST, but I recommend PnPJs (link below) for any data that it can reach.

The PnP Webpart Samples repo (link below) has samples that show how to render circles based on data, so that is a great place to start. Not enough detail to give any additional advice about the click-through functionality you mention but dig into those samples and you might find something to help.

Bottom line: Always start with Microsoft 365 PnP before you start building from scratch. Hundreds of samples and lots of opportunity to get help from the community. It is the #1 Community in the world IMO (and I'm not alone in the opinion!)

 

Links:

https://aka.ms/m365pnp

https://pnp.github.io/pnpjs/

https://aka.ms/spfx-webparts 

 

Don Kirkham
Microsoft MVP, Office Development

 

Please click Mark as Best Response & Like if my post helped you to answer or resolve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.