shineout 3.9.14-beta.10 → 3.9.14-beta.11

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.14-beta.10'
525
+ version: '3.9.14-beta.11'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12326,7 +12326,7 @@ var handleStyle = function handleStyle(style) {
12326
12326
  };
12327
12327
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12328
12328
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12329
- /* harmony default export */ var version = ('3.9.14-beta.10');
12329
+ /* harmony default export */ var version = ('3.9.14-beta.11');
12330
12330
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12331
12331
 
12332
12332
 
@@ -42038,6 +42038,9 @@ var VirtualList = function VirtualList(props) {
42038
42038
  // 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
42039
42039
  setTop(0);
42040
42040
  setStartIndex(0);
42041
+ if (wrapperRef.current) {
42042
+ wrapperRef.current.scrollTop = 0;
42043
+ }
42041
42044
  context.prevWrapperRefHeight = currentWrapperRefHeight;
42042
42045
  return function () {
42043
42046
  context.preIndex = null;
@@ -59315,9 +59318,7 @@ function Select(props0) {
59315
59318
  onClearCreatedData = _useFilter.onClearCreatedData,
59316
59319
  rawData = _useFilter.rawData,
59317
59320
  FilterProvider = _useFilter.FilterProvider;
59318
- var prevFilterTextRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(filterText);
59319
- var filterTextChanged = prevFilterTextRef.current !== filterText;
59320
- prevFilterTextRef.current = filterText;
59321
+ var prevListDataLengthRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
59321
59322
  var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
59322
59323
  _useState8 = slicedToArray_default()(_useState7, 2),
59323
59324
  absoluteListUpdateKey = _useState8[0],
@@ -59730,8 +59731,13 @@ function Select(props0) {
59730
59731
  });
59731
59732
  };
59732
59733
  var renderList = function renderList() {
59734
+ var _listData$length;
59735
+ var listData = groupBy ? groupData : filterData;
59736
+ var listDataLength = (_listData$length = listData === null || listData === void 0 ? void 0 : listData.length) !== null && _listData$length !== void 0 ? _listData$length : 0;
59737
+ var dataGrew = listDataLength > prevListDataLengthRef.current;
59738
+ prevListDataLengthRef.current = listDataLength;
59733
59739
  var listProps = {
59734
- data: groupBy ? groupData : filterData,
59740
+ data: listData,
59735
59741
  datum: datum,
59736
59742
  value: value,
59737
59743
  size: size,
@@ -59752,7 +59758,7 @@ function Select(props0) {
59752
59758
  renderItem: renderItem,
59753
59759
  controlType: controlType,
59754
59760
  onLoadMore: onLoadMore,
59755
- keepScrollTop: filterTextChanged ? false : true,
59761
+ keepScrollTop: dataGrew,
59756
59762
  isAnimationFinish: isAnimationFinish,
59757
59763
  threshold: threshold,
59758
59764
  onControlTypeChange: setControlType,
@@ -75764,7 +75770,7 @@ var upload_interface = __webpack_require__(8821);
75764
75770
 
75765
75771
 
75766
75772
  /* harmony default export */ var src_0 = ({
75767
- version: '3.9.14-beta.10'
75773
+ version: '3.9.14-beta.11'
75768
75774
  });
75769
75775
  }();
75770
75776
  /******/ return __webpack_exports__;