shineout 3.7.6-beta.3 → 3.7.6-fix.1

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.6-beta.3'
525
+ version: '3.7.6-fix.1'
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.6-beta.3');
12237
+ /* harmony default export */ var version = ('3.7.6-fix.1');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -32381,7 +32381,7 @@ var AvatarGroup = function AvatarGroup(props) {
32381
32381
  children: childrenHidden
32382
32382
  })
32383
32383
  }))]
32384
- }));
32384
+ }, "more-avatar"));
32385
32385
  }
32386
32386
  return /*#__PURE__*/(0,jsx_runtime.jsx)(AvatarProvider, {
32387
32387
  shape: shape,
@@ -35793,19 +35793,18 @@ function useInputAble(props) {
35793
35793
  var render = useRender(syncValue);
35794
35794
  var shouldUseState = delay || !control;
35795
35795
  var value = shouldUseState ? stateValue : valuePo;
35796
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
35797
- if (context.timer) {
35798
- clearTimeout(context.timer);
35799
- context.timer = null;
35800
- }
35796
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
35801
35797
  if (delay && control && props.value !== stateValue) {
35802
35798
  changeStateValue(props.value);
35799
+ } else if (context.timer) {
35800
+ clearTimeout(context.timer);
35801
+ context.timer = null;
35803
35802
  }
35804
35803
  }, [props.value, delay, control]);
35805
35804
  var forceDelayChange = use_persist_fn(function () {
35806
- if (context.timer && context.delayChange) {
35805
+ if (context.delayChange) context.delayChange();
35806
+ if (context.timer) {
35807
35807
  clearTimeout(context.timer);
35808
- context.delayChange();
35809
35808
  context.timer = null;
35810
35809
  context.delayChange = null;
35811
35810
  }
@@ -39997,6 +39996,7 @@ var VirtualList = function VirtualList(props) {
39997
39996
  className = props.className,
39998
39997
  lineHeight = props.lineHeight,
39999
39998
  height = props.height,
39999
+ keepScrollTop = props.keepScrollTop,
40000
40000
  keepScrollHeight = props.keepScrollHeight,
40001
40001
  renderItem = props.renderItem,
40002
40002
  customRenderItem = props.customRenderItem,
@@ -40193,6 +40193,7 @@ var VirtualList = function VirtualList(props) {
40193
40193
  }, [startIndex]);
40194
40194
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
40195
40195
  if (keepScrollHeight) return;
40196
+ if (keepScrollTop) return;
40196
40197
  // 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
40197
40198
  setTop(0);
40198
40199
  setStartIndex(0);
@@ -54288,6 +54289,7 @@ var list_List = function List(props) {
54288
54289
  lineHeightProp = props.lineHeight,
54289
54290
  threshold = props.threshold,
54290
54291
  controlType = props.controlType,
54292
+ keepScrollTop = props.keepScrollTop,
54291
54293
  hideCreateOption = props.hideCreateOption,
54292
54294
  optionListRef = props.optionListRef,
54293
54295
  isAnimationFinish = props.isAnimationFinish,
@@ -54463,6 +54465,7 @@ var list_List = function List(props) {
54463
54465
  dynamicVirtual: dynamicVirtual,
54464
54466
  tagClassName: styles.virtualList,
54465
54467
  height: height,
54468
+ keepScrollTop: keepScrollTop,
54466
54469
  onScroll: handleVirtualScroll,
54467
54470
  lineHeight: lineHeight,
54468
54471
  rowsInView: itemsInView,
@@ -56907,6 +56910,7 @@ function Select(props0) {
56907
56910
  renderItem: renderItem,
56908
56911
  controlType: controlType,
56909
56912
  onLoadMore: onLoadMore,
56913
+ keepScrollTop: !!filterText ? false : true,
56910
56914
  isAnimationFinish: isAnimationFinish,
56911
56915
  threshold: threshold,
56912
56916
  onControlTypeChange: setControlType,
@@ -71764,7 +71768,7 @@ var upload_interface = __webpack_require__(8821);
71764
71768
 
71765
71769
 
71766
71770
  /* harmony default export */ var src_0 = ({
71767
- version: '3.7.6-beta.3'
71771
+ version: '3.7.6-fix.1'
71768
71772
  });
71769
71773
  }();
71770
71774
  /******/ return __webpack_exports__;