【问题标题】:How to use ivhtree bread first search api如何使用iv树广度优先搜索api
【发布时间】:2016-08-23 17:50:42
【问题描述】:

我正在尝试使用 ivhTreeviewBfs (https://github.com/iVantage/angular-ivh-treeview#ivhtreeviewbfstree-opts-cb)

ivhTreeviewBfs(myTree, function(node) {
  console.log(node)
})

但是这只会打印第一级节点。如何遍历整个列表?

【问题讨论】:

标签: angularjs tree treeview breadth-first-search treecontrol


【解决方案1】:

我也面临同样的问题。 经过一些研究和测试,当您通过 ivh-treeview-children-attribute 覆盖子项的默认属性时,似乎会发生这种行为。

该服务不再检测到任何子级 (undefined),因此只处理第一级。

这个demo(来自@ua_boaz 的链接)说明了这个问题。

我还在想办法解决它。

更新: This issue 报告了类似的问题。一种解决方法是使用ivhTreeviewOptionsProviderdemo here 全局设置childrenAttribute

【讨论】:

  • 我很久以前就发现了这个问题,忘记更新了。谢谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-01-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多