jattac.libs.web.zest-button 1.5.1 → 1.5.2

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.cjs.js CHANGED
@@ -1774,6 +1774,13 @@ const ZestDropdownMenuItem = ({ option, disabled: externallyDisabled = false, on
1774
1774
  });
1775
1775
  require$$0.useEffect(() => {
1776
1776
  onBusyChange?.(internalBusy);
1777
+ // Radix can unmount this item mid-flight (e.g. an outside pointerdown dismissing the
1778
+ // dropdown while this item's own async onClick is still pending) - without this cleanup, the
1779
+ // parent never hears the matching busy:false and keeps this item's key marked busy forever.
1780
+ return () => {
1781
+ if (internalBusy)
1782
+ onBusyChange?.(false);
1783
+ };
1777
1784
  }, [internalBusy, onBusyChange]);
1778
1785
  const isDisabled = externallyDisabled || optionDisabled || internalBusy;
1779
1786
  const handleActivate = async (e) => {