shineout 3.7.8-beta.6 → 3.7.8-beta.7

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.7.8-beta.6'
525
+ version: '3.7.8-beta.7'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
12234
12234
  };
12235
12235
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12236
12236
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12237
- /* harmony default export */ var version = ('3.7.8-beta.6');
12237
+ /* harmony default export */ var version = ('3.7.8-beta.7');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -39572,8 +39572,8 @@ var useTree = function useTree(props) {
39572
39572
  var _context$value;
39573
39573
  if (mode !== MODE.MODE_0) return;
39574
39574
  (_context$value = context.value) === null || _context$value === void 0 || _context$value.forEach(function (id) {
39575
- var _ref3 = context.pathMap.get(id),
39576
- children = _ref3.children;
39575
+ var node = context.pathMap.get(id);
39576
+ var children = node === null || node === void 0 ? void 0 : node.children;
39577
39577
  if (children && children.length) {
39578
39578
  var noCheckedChildren = children.filter(function (cid) {
39579
39579
  var _context$value2;
@@ -40058,7 +40058,8 @@ var VirtualList = function VirtualList(props) {
40058
40058
  preIndex: null,
40059
40059
  topTimer: null,
40060
40060
  rateTimer: null,
40061
- shouldUpdateHeight: true
40061
+ shouldUpdateHeight: true,
40062
+ prevWrapperRefHeight: 0
40062
40063
  }),
40063
40064
  context = _useRef.current;
40064
40065
  var getContentHeight = function getContentHeight(index) {
@@ -40218,11 +40219,14 @@ var VirtualList = function VirtualList(props) {
40218
40219
  context.preIndex = startIndex;
40219
40220
  }, [startIndex]);
40220
40221
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
40221
- if (keepScrollHeight) return;
40222
+ var _wrapperRef$current2;
40223
+ var currentWrapperRefHeight = ((_wrapperRef$current2 = wrapperRef.current) === null || _wrapperRef$current2 === void 0 ? void 0 : _wrapperRef$current2.clientHeight) || 0;
40224
+ if (keepScrollHeight && currentWrapperRefHeight === context.prevWrapperRefHeight) return;
40222
40225
  if (keepScrollTop) return;
40223
40226
  // 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
40224
40227
  setTop(0);
40225
40228
  setStartIndex(0);
40229
+ context.prevWrapperRefHeight = currentWrapperRefHeight;
40226
40230
  return function () {
40227
40231
  context.preIndex = null;
40228
40232
  };
@@ -71854,7 +71858,7 @@ var upload_interface = __webpack_require__(8821);
71854
71858
 
71855
71859
 
71856
71860
  /* harmony default export */ var src_0 = ({
71857
- version: '3.7.8-beta.6'
71861
+ version: '3.7.8-beta.7'
71858
71862
  });
71859
71863
  }();
71860
71864
  /******/ return __webpack_exports__;