diff --git a/src/ui/TreeView.js b/src/ui/TreeView.js index 49df208ce9..9d830e2c3c 100644 --- a/src/ui/TreeView.js +++ b/src/ui/TreeView.js @@ -10,6 +10,8 @@ class TreeView { } this.beforeJsonNodeRendered = opts.beforeJsonNodeRendered || noop this.beforeJsonValueRendered = opts.beforeJsonValueRendered || noop + this.extractData = opts.extractData || this.extractDataDefault + this.formatData = opts.formatData || this.formatDataDefault this.view = null this.cssLabel = ui.formatCss(opts.css || {}, style.label) this.cssList = ui.formatCss(opts.css || {}, style.list) @@ -34,36 +36,50 @@ class TreeView { } renderObject (item, key, expand) { - var label - if (item instanceof Array || item instanceof Object) { - var properties = this.renderProperties(item, false) - label = yo`` - var list = yo`