shineout 3.9.11-beta.11 → 3.9.11-beta.12

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/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.9.11-beta.11'
525
+ version: '3.9.11-beta.12'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12402,7 +12402,7 @@ var handleStyle = function handleStyle(style) {
12402
12402
  };
12403
12403
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12404
12404
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12405
- /* harmony default export */ var version = ('3.9.11-beta.11');
12405
+ /* harmony default export */ var version = ('3.9.11-beta.12');
12406
12406
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12407
12407
 
12408
12408
 
@@ -41423,15 +41423,8 @@ var useTree = function useTree(props) {
41423
41423
  if (props.datum) return;
41424
41424
  if (!dataUpdate) return;
41425
41425
  setData(data);
41426
- var nextExpanded = props.expanded || props.defaultExpanded || [];
41427
- if (!defaultExpandAll && !shallowEqual(nextExpanded, expanded)) {
41428
- onExpand(nextExpanded);
41429
- updateExpanded(nextExpanded, true);
41430
- }
41431
- updateInnerCheckStatus();
41432
- }, [props.data]);
41433
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
41434
41426
  if (defaultExpandAll) {
41427
+ // data 变化后 dataMap 已由 setData 填充,直接收集所有可展开节点
41435
41428
  var nextExpanded = [];
41436
41429
  context.dataMap.forEach(function (item, k) {
41437
41430
  if (item[childrenKey]) {
@@ -41440,8 +41433,15 @@ var useTree = function useTree(props) {
41440
41433
  });
41441
41434
  onExpand(nextExpanded);
41442
41435
  updateExpanded(nextExpanded, true);
41436
+ } else {
41437
+ var _nextExpanded = props.expanded || props.defaultExpanded || [];
41438
+ if (!shallowEqual(_nextExpanded, expanded)) {
41439
+ onExpand(_nextExpanded);
41440
+ updateExpanded(_nextExpanded, true);
41441
+ }
41443
41442
  }
41444
- }, [context.dataMap, props.data]);
41443
+ updateInnerCheckStatus();
41444
+ }, [props.data]);
41445
41445
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
41446
41446
  if (props.datum) return;
41447
41447
  setValue(value);
@@ -71542,7 +71542,7 @@ var TreeSelect = function TreeSelect(props0) {
71542
71542
  onTiledFilter === null || onTiledFilter === void 0 || onTiledFilter(trim ? text.trim() : text, from);
71543
71543
  };
71544
71544
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
71545
- if (virtual && expanded) {
71545
+ if (virtual && expanded && expanded.length > 0) {
71546
71546
  setVirtualExpanded(expanded);
71547
71547
  }
71548
71548
  }, [expanded]);
@@ -75557,7 +75557,7 @@ var upload_interface = __webpack_require__(8821);
75557
75557
 
75558
75558
 
75559
75559
  /* harmony default export */ var src_0 = ({
75560
- version: '3.9.11-beta.11'
75560
+ version: '3.9.11-beta.12'
75561
75561
  });
75562
75562
  }();
75563
75563
  /******/ return __webpack_exports__;