x-ui-design 0.3.81 → 0.3.82

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
@@ -3123,7 +3123,7 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3123
3123
  const shouldShowAbove = spaceBelow < dropdownHeight && spaceAbove > dropdownHeight;
3124
3124
  const shouldShowBelow = spaceAbove < dropdownHeight && spaceBelow > dropdownHeight;
3125
3125
  const inForm = !triggerNode.closest(`.${prefixClsForm}`) ? FORM_MARGIN_BOTTOM : 0;
3126
- if (shouldShowAbove || shouldShowBelow || searchQueryUpdated || !isOpenChecker) {
3126
+ if (isOpen && (shouldShowAbove || shouldShowBelow || searchQueryUpdated || !isOpenChecker)) {
3127
3127
  if (getPopupContainer) {
3128
3128
  positionStyle = {
3129
3129
  ...positionStyle,
@@ -3137,9 +3137,12 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3137
3137
  left: `${triggerNode.offsetLeft - PADDING_PLACEMENT / 2}px`
3138
3138
  };
3139
3139
  }
3140
+ console.log(1, {
3141
+ ...positionStyle
3142
+ });
3140
3143
  setDropdownPosition(positionStyle);
3141
3144
  }
3142
- }, [prefixCls, listHeight, getPopupContainer, isOpenChecker]);
3145
+ }, [prefixCls, listHeight, getPopupContainer, isOpenChecker, isOpen]);
3143
3146
  useEffect(() => {
3144
3147
  setIsOpenChecker(isOpen);
3145
3148
  if (!isOpen) {
@@ -3385,7 +3388,7 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
3385
3388
  style: {
3386
3389
  ...dropdownPosition,
3387
3390
  maxHeight: listHeight,
3388
- opacity: dropdownPosition.top ? 1 : 0
3391
+ opacity: Object.keys(dropdownPosition).length ? 1 : 0
3389
3392
  }
3390
3393
  }, filterable && /*#__PURE__*/React$1.createElement("input", {
3391
3394
  type: "text",