8 thoughts on “Tree view navigation using PnP Treeview control in the SharePoint Framework (SPFx) web part”
Hi,
After adding this webpart, the navigation elements supposed to display on the left side of the page(Left side site navigation bar) or it just displays on the page as a normal webpart?
Because in the picture above it’s showing on the left side of the page just as the managed navigation or structural navigation. I was also expecting it to be on the left side but I got it in the center of the page itself.
Hi Ravi,
I was able to follow your example and managed to implement the treeview to load the terms under a termset from my managed metadata service. It works on both my SP2016 on prem and on my spo tenant. But the icons to expand and collapse a treeitem does not display on Prem but work fine in SPO.. any ideas on that?
Hi,
After adding this webpart, the navigation elements supposed to display on the left side of the page(Left side site navigation bar) or it just displays on the page as a normal webpart?
Because in the picture above it’s showing on the left side of the page just as the managed navigation or structural navigation. I was also expecting it to be on the left side but I got it in the center of the page itself.
LikeLike
Hi,
This is just SPFx web part, so you have to place where you want.
LikeLike
HI,
I tried and added the webpart and it somehow worked. But here in this image(https://lh3.googleusercontent.com/-x-n7oe4eZMY/WDMnnIBx69I/AAAAAAAAEPo/ydb_Fjyth0A/s1600-h/News%252520page%25255B3%25255D.png) there’s a quick launch with links for Home, Notebook, Documents, etc,. I wonder if it’s possible to add this tree view navigation webpart there in the left quick launch pane? I can’t add this webpart there in the quick launch. Am I missing anything here?
LikeLike
Hi,
You can use SharePoint frameworkโs application customizer under extension category for do this change.
LikeLiked by 1 person
Hi, how to implement this if there is 3rd level of child in data from SharePoint list. Parent- child- grandchild
LikeLiked by 1 person
Hi Orbitter,
If you follow this logic, you can build the infinite child
allItems.forEach(function (v, i) {
addchild(v.item,v.parent)
});
function addchild(treeitem, parentitem)
{
add value to the array
}
LikeLiked by 1 person
Hi Ravi,
I was able to follow your example and managed to implement the treeview to load the terms under a termset from my managed metadata service. It works on both my SP2016 on prem and on my spo tenant. But the icons to expand and collapse a treeitem does not display on Prem but work fine in SPO.. any ideas on that?
LikeLiked by 1 person
Hi Karthik,
I’m not sure about the reason this issue, I don’t prem environment for test this
LikeLiked by 1 person