shineout 3.9.1-beta.1 → 3.9.1-beta.3

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.1-beta.1'
525
+ version: '3.9.1-beta.3'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12400,7 +12400,7 @@ var handleStyle = function handleStyle(style) {
12400
12400
  };
12401
12401
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12402
12402
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12403
- /* harmony default export */ var version = ('3.9.1-beta.1');
12403
+ /* harmony default export */ var version = ('3.9.1-beta.3');
12404
12404
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12405
12405
 
12406
12406
 
@@ -58458,7 +58458,9 @@ function Select(props0) {
58458
58458
  _props$trigger = props.trigger,
58459
58459
  trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
58460
58460
  _props$preventEnterSe = props.preventEnterSelect,
58461
- preventEnterSelect = _props$preventEnterSe === void 0 ? false : _props$preventEnterSe;
58461
+ preventEnterSelect = _props$preventEnterSe === void 0 ? false : _props$preventEnterSe,
58462
+ _props$createOnBlur = props.createOnBlur,
58463
+ createOnBlur = _props$createOnBlur === void 0 ? true : _props$createOnBlur;
58462
58464
  var hasFilter = isFunc(props.onAdvancedFilter || onFilterProp);
58463
58465
  var showInput = hasFilter || isFunc(onCreateProp) || onCreateProp === true;
58464
58466
  var positionProp = props.position || (direction === 'rtl' ? 'bottom-right' : 'bottom-left');
@@ -58708,7 +58710,7 @@ function Select(props0) {
58708
58710
  if (multiple && !text) return;
58709
58711
  // 防止点击 option 后触发 blur 事件,先把要做的事情存起来,后面再看要不要执行
58710
58712
  if (createdData) {
58711
- if (!datum.check(createdData)) {
58713
+ if (createOnBlur && !datum.check(createdData)) {
58712
58714
  datum.add(createdData);
58713
58715
  }
58714
58716
  onClearCreatedData();
@@ -64049,7 +64051,8 @@ var scroll_table_Scroll = function Scroll(props) {
64049
64051
  var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
64050
64052
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
64051
64053
  isMouseDown: false,
64052
- lastTableHeight: 0
64054
+ lastTableHeight: 0,
64055
+ prevTableHeight: 0
64053
64056
  }),
64054
64057
  context = _useRef.current;
64055
64058
  var _props$scrollHeight = props.scrollHeight,
@@ -64161,16 +64164,16 @@ var scroll_table_Scroll = function Scroll(props) {
64161
64164
  if (!props.tableRef.current) return;
64162
64165
  var isVisible = props.tableRef.current.offsetParent !== null;
64163
64166
  var wasHidden = props.tableRef.current.getAttribute('data-was-hidden') === 'true';
64164
- var h = context.lastTableHeight || props.tableRef.current.clientHeight;
64167
+ var h = context.prevTableHeight || props.tableRef.current.clientHeight;
64165
64168
  if (h > 0) {
64166
- context.lastTableHeight = h;
64169
+ context.prevTableHeight = h;
64167
64170
  }
64168
64171
  if (isVisible && wasHidden) {
64169
64172
  props.tableRef.current.style.height = '100%';
64170
64173
  props.tableRef.current.removeAttribute('data-was-hidden');
64171
- } else if (!isVisible && props.tableRef.current.style.height === '100%') {
64174
+ } else if (!isVisible && props.tableRef.current.style.height === '100%' && context.prevTableHeight > 0) {
64172
64175
  // 加height === '100%'判断是因为:多层父级flex嵌套才有这个问题
64173
- props.tableRef.current.style.height = "".concat(context.lastTableHeight, "px");
64176
+ props.tableRef.current.style.height = "".concat(context.prevTableHeight, "px");
64174
64177
  props.tableRef.current.setAttribute('data-was-hidden', 'true');
64175
64178
  }
64176
64179
  }, [paddingTop]);
@@ -74409,7 +74412,7 @@ var upload_interface = __webpack_require__(8821);
74409
74412
 
74410
74413
 
74411
74414
  /* harmony default export */ var src_0 = ({
74412
- version: '3.9.1-beta.1'
74415
+ version: '3.9.1-beta.3'
74413
74416
  });
74414
74417
  }();
74415
74418
  /******/ return __webpack_exports__;