shineout 3.8.9-beta.2 → 3.8.9-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.8.9-beta.2'
525
+ version: '3.8.9-fix.1'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12398,7 +12398,7 @@ var handleStyle = function handleStyle(style) {
12398
12398
  };
12399
12399
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12400
12400
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12401
- /* harmony default export */ var version = ('3.8.9-beta.2');
12401
+ /* harmony default export */ var version = ('3.8.9-fix.1');
12402
12402
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12403
12403
 
12404
12404
 
@@ -36396,19 +36396,18 @@ function useInputAble(props) {
36396
36396
  var render = useRender(syncValue);
36397
36397
  var shouldUseState = delay || !control;
36398
36398
  var value = shouldUseState ? stateValue : valuePo;
36399
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
36400
- if (context.timer) {
36401
- clearTimeout(context.timer);
36402
- context.timer = null;
36403
- }
36399
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
36404
36400
  if (delay && control && props.value !== stateValue) {
36405
36401
  changeStateValue(props.value);
36402
+ } else if (context.timer) {
36403
+ clearTimeout(context.timer);
36404
+ context.timer = null;
36406
36405
  }
36407
36406
  }, [props.value, delay, control]);
36408
36407
  var forceDelayChange = use_persist_fn(function () {
36409
- if (context.timer && context.delayChange) {
36408
+ if (context.delayChange) context.delayChange();
36409
+ if (context.timer) {
36410
36410
  clearTimeout(context.timer);
36411
- context.delayChange();
36412
36411
  context.timer = null;
36413
36412
  context.delayChange = null;
36414
36413
  }
@@ -57814,7 +57813,8 @@ function Select(props0) {
57814
57813
  }
57815
57814
  };
57816
57815
  var handleSelectChange = usePersistFn(function (value, dataItem, checked) {
57817
- if (createdData || props.emptyAfterSelect) {
57816
+ // why: props.emptyAfterSelect !== false 兼容之前的逻辑
57817
+ if (props.emptyAfterSelect !== false && (props.emptyAfterSelect || createdData)) {
57818
57818
  onFilter === null || onFilter === void 0 || onFilter('');
57819
57819
  }
57820
57820
  var shouldFocus = showInput && props.reFocus;
@@ -73393,7 +73393,7 @@ var upload_interface = __webpack_require__(8821);
73393
73393
 
73394
73394
 
73395
73395
  /* harmony default export */ var src_0 = ({
73396
- version: '3.8.9-beta.2'
73396
+ version: '3.8.9-fix.1'
73397
73397
  });
73398
73398
  }();
73399
73399
  /******/ return __webpack_exports__;