diff --git a/src/ui/TreeView.js b/src/ui/TreeView.js index fe05aa580b..71269f15f3 100644 --- a/src/ui/TreeView.js +++ b/src/ui/TreeView.js @@ -16,7 +16,7 @@ class TreeView { this.cssLabel = ui.formatCss(opts.css || {}, style.label) this.cssUl = ui.formatCss(opts.css || {}, style.cssUl) this.cssLi = ui.formatCss(opts.css || {}, style.cssLi) - this.keyPaths = {} + this.nodeIsExpanded = {} } render (json) { @@ -36,7 +36,7 @@ class TreeView { renderObject (item, parent, key, expand, keyPath) { var data = this.extractData(item, parent, key) var children = (data.children || []).map((child, index) => { - return this.renderObject(child.value, data, child.key, expand, keyPath + '_' + child.key) + return this.renderObject(child.value, data, child.key, expand, keyPath + ',' + child.key) }) return this.formatData(key, data, children, expand, keyPath) } @@ -53,14 +53,14 @@ class TreeView { var renderedChildren = '' if (children.length) { renderedChildren = yo`