Skip to content

Commit

Permalink
Fix primefaces#3070: OverlayPanel respect dismissable prop
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jul 20, 2022
1 parent 5ea65b4 commit 5ff0bc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/overlaypanel/OverlayPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5ff0bc1

Please sign in to comment.