x-ui-design 0.8.90 → 0.8.91

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
@@ -2727,12 +2727,12 @@ const usePopupPosition = ({
2727
2727
  if (!open) {
2728
2728
  return;
2729
2729
  }
2730
- const setPositionRelative = position => {
2731
- scrollableParents.style.position = position;
2732
- if (popupContainer) {
2733
- popupContainer.style.position = position;
2734
- }
2735
- };
2730
+ // const setPositionRelative = (position: string) => {
2731
+ // (scrollableParents as HTMLDivElement).style.position = position;
2732
+ // if (popupContainer) {
2733
+ // (popupContainer as HTMLDivElement).style.position = position;
2734
+ // }
2735
+ // }
2736
2736
  const controller = new AbortController();
2737
2737
  const options = {
2738
2738
  passive: true,
@@ -2742,13 +2742,13 @@ const usePopupPosition = ({
2742
2742
  scrollableParents
2743
2743
  } = getElementParentDetails(targetRef.current, true);
2744
2744
  scrollableParents?.addEventListener("scroll", calculatePosition, options);
2745
- setPositionRelative('relative');
2745
+ // setPositionRelative('relative');
2746
2746
  calculatePosition();
2747
2747
  document.body.addEventListener("scroll", calculatePosition, options);
2748
2748
  document.body.addEventListener("resize", calculatePosition, options);
2749
2749
  return () => {
2750
2750
  controller.abort();
2751
- setPositionRelative('unset');
2751
+ // setPositionRelative('unset');
2752
2752
  };
2753
2753
  }, [open, targetRef, popupContainer, inBody, calculatePosition]);
2754
2754
  return {