From 5ff0bc15a8a6572a4a9d81e433c1b6d9b27f161d Mon Sep 17 00:00:00 2001 From: melloware Date: Wed, 20 Jul 2022 15:13:48 -0400 Subject: [PATCH] Fix #3070: OverlayPanel respect dismissable prop --- 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;