intelicoreact 1.2.32 → 1.2.34
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.
|
@@ -114,13 +114,11 @@ function useMobileModal(_ref) {
|
|
|
114
114
|
(0, _react.useLayoutEffect)(function () {
|
|
115
115
|
if (isOpen) {
|
|
116
116
|
var modalStyle = modalRef !== null && modalRef !== void 0 && modalRef.current ? (modalRef === null || modalRef === void 0 ? void 0 : modalRef.current.currentStyle) || window.getComputedStyle(modalRef === null || modalRef === void 0 ? void 0 : modalRef.current) : {};
|
|
117
|
-
|
|
118
|
-
var _modalHeight = modalRef !== null && modalRef !== void 0 && modalRef.current ? _modalHeight + parseFloat((modalStyle === null || modalStyle === void 0 ? void 0 : modalStyle.marginTop) || 0) : 0;
|
|
119
|
-
|
|
117
|
+
var computedModalHeight = modalRef !== null && modalRef !== void 0 && modalRef.current ? modalHeight + parseFloat((modalStyle === null || modalStyle === void 0 ? void 0 : modalStyle.marginTop) || 0) : 0;
|
|
120
118
|
var windowHeight = document.documentElement.clientHeight || window.screen.availHeight || window.screen.height;
|
|
121
119
|
|
|
122
120
|
if (modalMobileContainerRef !== null && modalMobileContainerRef !== void 0 && modalMobileContainerRef.current) {
|
|
123
|
-
if (
|
|
121
|
+
if (computedModalHeight <= windowHeight) {
|
|
124
122
|
modalMobileContainerRef.current.style.display = 'flex';
|
|
125
123
|
modalMobileContainerRef.current.style.alignItems = 'flex-end';
|
|
126
124
|
} else {
|
|
@@ -141,9 +139,6 @@ function useMobileModal(_ref) {
|
|
|
141
139
|
|
|
142
140
|
if (modalHeight !== newModalHeight) {
|
|
143
141
|
setModalHeight(newModalHeight);
|
|
144
|
-
console.log({
|
|
145
|
-
modalHeight: modalHeight
|
|
146
|
-
});
|
|
147
142
|
}
|
|
148
143
|
}
|
|
149
144
|
});
|