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 +7 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1751,6 +1751,13 @@ const ZestDropdownMenuItem = ({ option, disabled: externallyDisabled = false, on
|
|
|
1751
1751
|
});
|
|
1752
1752
|
useEffect(() => {
|
|
1753
1753
|
onBusyChange?.(internalBusy);
|
|
1754
|
+
// Radix can unmount this item mid-flight (e.g. an outside pointerdown dismissing the
|
|
1755
|
+
// dropdown while this item's own async onClick is still pending) - without this cleanup, the
|
|
1756
|
+
// parent never hears the matching busy:false and keeps this item's key marked busy forever.
|
|
1757
|
+
return () => {
|
|
1758
|
+
if (internalBusy)
|
|
1759
|
+
onBusyChange?.(false);
|
|
1760
|
+
};
|
|
1754
1761
|
}, [internalBusy, onBusyChange]);
|
|
1755
1762
|
const isDisabled = externallyDisabled || optionDisabled || internalBusy;
|
|
1756
1763
|
const handleActivate = async (e) => {
|