x-ui-design 0.7.54 → 0.7.55
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
|
@@ -2833,7 +2833,8 @@ const TimePicker = ({
|
|
|
2833
2833
|
const inputRect = inputRef.current.getBoundingClientRect();
|
|
2834
2834
|
const popupEl = popupRef.current;
|
|
2835
2835
|
const dropdownHeight = popupEl?.offsetHeight || 230;
|
|
2836
|
-
const
|
|
2836
|
+
const parents = getScrollParents(inputRef.current);
|
|
2837
|
+
const popupContainer = getPopupContainer ? getPopupContainer(document.body) : parents[parents.length - 2] || parents[1] || document.body;
|
|
2837
2838
|
const containerRect = popupContainer.getBoundingClientRect();
|
|
2838
2839
|
const spaceAbove = inputRect.top - containerRect.top;
|
|
2839
2840
|
const spaceBelow = containerRect.bottom - inputRect.bottom;
|