yootd 0.0.37 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -200,15 +200,16 @@ export var Tree = /*#__PURE__*/forwardRef(function (_ref, ref) {
200
200
  setExpandedKeys(function (prevKeys) {
201
201
  return [].concat(_toConsumableArray(prevKeys), [node.key]);
202
202
  });
203
- if (node.children) {
203
+ //@ts-ignore
204
+ if (node.children && (node.areaLevel <= 1 || node.deptLevel <= 1)) {
204
205
  expandAllNodes(node.children);
205
206
  }
206
207
  });
207
208
  };
208
- if (defaultData.length > 0) {
209
- expandAllNodes(defaultData);
209
+ if (treeData != null && treeData.length > 0) {
210
+ expandAllNodes(treeData);
210
211
  }
211
- }, [defaultData]);
212
+ }, [treeData]);
212
213
  return /*#__PURE__*/React.createElement("div", null, showSearch ? /*#__PURE__*/React.createElement(Search, {
213
214
  style: {
214
215
  marginBottom: 8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yootd",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",