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.
- package/dist/tree/index.js +5 -4
- package/package.json +1 -1
package/dist/tree/index.js
CHANGED
@@ -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
|
-
|
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 (
|
209
|
-
expandAllNodes(
|
209
|
+
if (treeData != null && treeData.length > 0) {
|
210
|
+
expandAllNodes(treeData);
|
210
211
|
}
|
211
|
-
}, [
|
212
|
+
}, [treeData]);
|
212
213
|
return /*#__PURE__*/React.createElement("div", null, showSearch ? /*#__PURE__*/React.createElement(Search, {
|
213
214
|
style: {
|
214
215
|
marginBottom: 8
|