Comparing version 3.8.178 to 3.8.179
@@ -67,2 +67,3 @@ "use strict"; | ||
var React = require("react"); | ||
var _ = require("lodash"); | ||
var antd_1 = require("antd"); | ||
@@ -105,9 +106,11 @@ var ActionTree_1 = require("./ActionTree"); | ||
} | ||
if (!param.defaultExpandAll) { | ||
if (tree.length == 1 && param.defaultExpandedKeys.length == 0) { | ||
if (tree.length == 1 && !param.defaultExpandAll) { | ||
if (param.defaultExpandedKeys && _.isArray(param.defaultExpandedKeys)) { | ||
} | ||
else { | ||
param.defaultExpandedKeys = [tree[0][this.fields.keyField]]; | ||
if (this.props.canAddRoot == undefined || this.props.canAddRoot == false) { | ||
param.className = param.className + ' utree-root'; | ||
} | ||
} | ||
if (this.props.canAddRoot == undefined || this.props.canAddRoot == false) { | ||
param.className = param.className + ' utree-root'; | ||
} | ||
} | ||
@@ -114,0 +117,0 @@ this.setState({ loading: false, tree: tree, face: param, selectedKeys: selectedKeys }); |
@@ -77,10 +77,8 @@ "use strict"; | ||
if (tree.length == 1 && !param.defaultExpandAll) { | ||
if (tree.length == 1) { | ||
if (param.defaultExpandedKeys && _.isArray(param.defaultExpandedKeys)) { | ||
} | ||
else { | ||
param.defaultExpandedKeys = [tree[0][this.fields.keyField]]; | ||
} | ||
param.className = param.className + ' utree-root'; | ||
if (param.defaultExpandedKeys && _.isArray(param.defaultExpandedKeys)) { | ||
} | ||
else { | ||
param.defaultExpandedKeys = [tree[0][this.fields.keyField]]; | ||
} | ||
param.className = param.className + ' utree-root'; | ||
} | ||
@@ -87,0 +85,0 @@ this.setState({ loading: false, tree: tree, face: param, selectedKeys: selectedKeys }); |
@@ -157,12 +157,14 @@ "use strict"; | ||
resp = _b.sent(); | ||
if (_.isArray(resp[VDATA.data])) { | ||
treeData = resp[VDATA.data]; | ||
if (treeData.length == 1) { | ||
selectedKeys = treeData[0][this.keyField]; | ||
if (resp[VDATA.data]) { | ||
if (_.isArray(resp[VDATA.data])) { | ||
treeData = resp[VDATA.data]; | ||
if (treeData.length == 1) { | ||
selectedKeys = treeData[0][this.keyField]; | ||
} | ||
} | ||
else { | ||
treeData = [resp[VDATA.data]]; | ||
selectedKeys = [resp[VDATA.data][this.keyField]]; | ||
} | ||
} | ||
else { | ||
treeData = [resp[VDATA.data]]; | ||
selectedKeys = [resp[VDATA.data][this.keyField]]; | ||
} | ||
if (this.props.defaultSelectedKeys) { | ||
@@ -169,0 +171,0 @@ selectedKeys = this.props.defaultSelectedKeys; |
{ | ||
"name": "vap", | ||
"version": "3.8.178", | ||
"version": "3.8.179", | ||
"description": "vap - framework for webapps, support micro-service(base on vap-base) and single-web-application(base on vap-base)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1909707
569
46163