@acrool/react-picker 0.0.10-alpha.2 → 0.0.10-alpha.4

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.
@@ -5538,16 +5538,18 @@ const Zs = ({
5538
5538
  const v = p.bottom, T = p.top, P = p.left, y = p.right, x = window.pageYOffset || document.documentElement.scrollTop, w = window.pageXOffset || document.documentElement.scrollLeft, A = window.innerWidth || document.documentElement.clientWidth, L = window.innerHeight || document.documentElement.clientHeight, $ = 15, R = v + f < L, _ = T - (f + $) > 0;
5539
5539
  o === st.bottom ? !R && _ && (o = st.top) : o === st.top && (R && !_ || !R && !_) && (o = st.bottom);
5540
5540
  const U = P + d < A, M = y - (d + $) > 0;
5541
- r === mt.left ? !U && M && (r = mt.right) : r === mt.right && (U && !M || !U && !M) && (r = mt.left), s.setVertical(o), i.current.style.top = o === st.bottom ? `${v + x}px` : `${v + x - (f + g)}px`, i.current.style.left = r === mt.left ? `${P + w}px` : `${y + w - d}px`, i.current.style.transformOrigin = o === st.bottom ? "top" : "bottom", requestAnimationFrame(a);
5541
+ r === mt.left ? !U && M && (r = mt.right) : r === mt.right && (U && !M || !U && !M) && (r = mt.left), s.setVertical(o), i.current.style.top = o === st.bottom ? `${v + x}px` : `${v + x - (f + g)}px`, i.current.style.left = r === mt.left ? `${P + w}px` : `${y + w - d}px`, i.current.style.transformOrigin = o === st.bottom ? "top" : "bottom", i.current.style.display = "block", requestAnimationFrame(a);
5542
5542
  }
5543
5543
  };
5544
5544
  if (e.current && i.current) {
5545
5545
  const l = new ResizeObserver(a);
5546
- return l.observe(i.current), i.current.style.display = "block", () => {
5546
+ return l.observe(i.current), window.requestAnimationFrame(() => {
5547
+ i.current && (i.current.style.display = "block");
5548
+ }), () => {
5547
5549
  l.disconnect();
5548
5550
  };
5549
5551
  }
5550
- }, [s.isVisible, e, i]), /* @__PURE__ */ j.jsx(j.Fragment, { children: /* @__PURE__ */ j.jsx(
5552
+ }, [s.isVisible]), /* @__PURE__ */ j.jsx(j.Fragment, { children: /* @__PURE__ */ j.jsx(
5551
5553
  If.div,
5552
5554
  {
5553
5555
  ref: Do(n, i),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrool/react-picker",
3
- "version": "0.0.10-alpha.2",
3
+ "version": "0.0.10-alpha.4",
4
4
  "description": "This is a react method to quickly combine buttons with Picker",
5
5
  "keywords": [
6
6
  "acrool",