x-ui-design 0.9.22 → 0.9.23
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 +5 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/lib/hooks/usePopupPosition.ts +7 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2752,12 +2752,16 @@ const usePopupPosition = ({
|
|
|
2752
2752
|
setPopupPosition({});
|
|
2753
2753
|
};
|
|
2754
2754
|
}, [open, targetRef, calculatePosition]);
|
|
2755
|
+
const opacity = useMemo(() => {
|
|
2756
|
+
console.log(popupRect?.width, popupPosition);
|
|
2757
|
+
return Object.keys(popupPosition).length && popupRect?.width ? 1 : 0;
|
|
2758
|
+
}, [popupPosition, popupRect?.width]);
|
|
2755
2759
|
return {
|
|
2756
2760
|
_placement,
|
|
2757
2761
|
popupStyle: {
|
|
2758
2762
|
zIndex: 10000,
|
|
2759
2763
|
position: "absolute",
|
|
2760
|
-
opacity:
|
|
2764
|
+
opacity: opacity,
|
|
2761
2765
|
...popupPosition
|
|
2762
2766
|
}
|
|
2763
2767
|
};
|