i am trying to use ivhTreeviewBfs (https://github.com/iVantage/angular-ivh-treeview#ivhtreeviewbfstree-opts-cb)
ivhTreeviewBfs(myTree, function(node) {
console.log(node)
})
however this only prints the first level of nodes. How can i traverse through the entire list?
I am facing the same issue.
After some research and testing it seems that this behavior occurs when you override the default attribute for the children via ivh-treeview-children-attribute
.
The service doesn't detect any children anymore (undefined
), hence only process the first level.
This demo (forked from @ua_boaz's link) illustrates the issue.
I am still trying to figure out how to fix it.
UPDATE: This issue reports a similar problem. A workaround is to set the childrenAttribute
globally using the ivhTreeviewOptionsProvider
, demo here.