mimir-ui-kit 1.34.1 → 1.34.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -37,10 +37,10 @@ function DatePickerModal({
|
|
37
37
|
const windowWidth = window.innerWidth;
|
38
38
|
if (field.current !== null) {
|
39
39
|
const inputWidth = ((_b = (_a2 = field == null ? void 0 : field.current) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.offsetWidth) || 0;
|
40
|
-
const inputHeight = (_d = (_c = field == null ? void 0 : field.current) == null ? void 0 : _c.parentElement) == null ? void 0 : _d.offsetHeight;
|
40
|
+
const inputHeight = ((_d = (_c = field == null ? void 0 : field.current) == null ? void 0 : _c.parentElement) == null ? void 0 : _d.offsetHeight) || 0;
|
41
41
|
const inputPosition = field.current.getBoundingClientRect();
|
42
42
|
const calendarSize = field.current.offsetHeight;
|
43
|
-
if (windowHeight < inputPosition.y + calendarSize) {
|
43
|
+
if (windowHeight < inputPosition.y + calendarSize + inputHeight) {
|
44
44
|
field.current.style.top = -calendarSize + "px";
|
45
45
|
} else {
|
46
46
|
field.current.style.top = inputHeight + "px";
|