From c05f41e4fee925c459dc4125b0203f101aad9116 Mon Sep 17 00:00:00 2001 From: Melloware Date: Wed, 20 Jul 2022 15:21:45 -0400 Subject: [PATCH] Fix #3070: OverlayPanel respect dismissable prop (#3086) --- components/lib/overlaypanel/OverlayPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/overlaypanel/OverlayPanel.js b/components/lib/overlaypanel/OverlayPanel.js index 9824add5bd..ed106982d1 100644 --- a/components/lib/overlaypanel/OverlayPanel.js +++ b/components/lib/overlaypanel/OverlayPanel.js @@ -19,7 +19,7 @@ export const OverlayPanel = React.forwardRef((props, ref) => { const [bindOverlayListener, unbindOverlayListener] = useOverlayListener({ target: currentTargetRef, overlay: overlayRef, listener: (event, { type, valid }) => { if (valid) { - (type === 'outside') ? !isPanelClicked.current && hide() : hide(); + (type === 'outside') ? props.dismissable && !isPanelClicked.current && hide() : hide(); } isPanelClicked.current = false;