Open LaNoriainnova opened 3 years ago
Did you find a solution for this? I'm having the same issue.
same problem....
same problem.... is there a solution to refresh or reload a dynamic tree Thanks
$('#treeview').empty(); //to empty the div $('#treeview').removeData(); // to recall the js function (need to put or else it will not show any treeview) I add above code before calling .bstreeview function and it works. $('#treeview').bstreeview({ data: bor, //expandIcon: '', //collapseIcon: '', indent: 1.25, parentsMarginLeft: '1.25rem', openNodeLinkOnNewTab: true, });
im building a dynamic tree for this i call a method which builds the tree, but when i call the same function so it can build the new tree when a get to the part of $('#tree').bstreeview({data: json}); it dosen't do nothing
// this is just an example
function buildsTreeDyanamic(){ // the values of this json changes every time the function is call var mydynamictree = [ { icon: "fa fa-globe fa-fw", text: "Go to Google", class: "text-info", href: "https://google.com" } ]; // it does print the tree ithe first time, but when a clean that div and call the function again the tree dosen´t appear $('#tree').bstreeview({data: mydynamictree }); }