x-ui-design 0.3.29 → 0.3.30

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/dist/index.esm.js CHANGED
@@ -3044,6 +3044,13 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3044
3044
  position: 'absolute'
3045
3045
  };
3046
3046
  const shouldShowAbove = spaceBelow < dropdownHeight && spaceAbove > dropdownHeight;
3047
+ console.info({
3048
+ selectBox,
3049
+ shouldShowAbove,
3050
+ scrollX: window.scrollX,
3051
+ offsetTop: selectRef.current.offsetTop,
3052
+ clientHeight: selectRef.current.clientHeight
3053
+ });
3047
3054
  if (getPopupContainer) {
3048
3055
  positionStyle = {
3049
3056
  ...positionStyle,
@@ -3059,6 +3066,11 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3059
3066
  }
3060
3067
  setDropdownPosition(positionStyle);
3061
3068
  }, [listHeight, getPopupContainer]);
3069
+ useEffect(() => {
3070
+ if (!isOpen) {
3071
+ return setDropdownPosition({});
3072
+ }
3073
+ }, [isOpen]);
3062
3074
  useEffect(() => {
3063
3075
  if (!isOpen) return;
3064
3076
  updateDropdownPosition();
@@ -3235,7 +3247,7 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3235
3247
  }
3236
3248
  const searchContent = selectRef.current?.getElementsByClassName(`${prefixCls}-tag-container`)?.[0];
3237
3249
  if (searchContent) {
3238
- setSearchInputWidth(searchContent.clientWidth - (hasMode ? PADDING_TAG_INPUT : 0));
3250
+ setSearchInputWidth(searchContent.clientWidth - PADDING_TAG_INPUT);
3239
3251
  }
3240
3252
  const timeout = setTimeout(() => {
3241
3253
  const searchInput = document.getElementById(`${prefixCls}-search-tag-input`);
@@ -3284,7 +3296,8 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3284
3296
  }]),
3285
3297
  style: {
3286
3298
  ...dropdownPosition,
3287
- maxHeight: listHeight
3299
+ maxHeight: listHeight,
3300
+ opacity: Object.keys(dropdownPosition).length ? 1 : 0
3288
3301
  }
3289
3302
  }, filterable && /*#__PURE__*/React$1.createElement("input", {
3290
3303
  type: "text",