From cf46d454e5e0c3f92307d3446e161a469e405309 Mon Sep 17 00:00:00 2001 From: Konrad Kierus Date: Thu, 22 Aug 2024 09:57:01 +0200 Subject: [PATCH] fix(Popup): fix ability to not hide popup on scroll --- src/modules/Popup/Popup.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/Popup/Popup.js b/src/modules/Popup/Popup.js index 2c3c9ba4f2..ccd61053d0 100644 --- a/src/modules/Popup/Popup.js +++ b/src/modules/Popup/Popup.js @@ -124,6 +124,7 @@ const Popup = React.forwardRef(function (props, ref) { eventsEnabled = true, flowing, header, + hideOnScroll, inverted, offset, pinned = false, @@ -179,8 +180,8 @@ const Popup = React.forwardRef(function (props, ref) { _.invoke(props, 'onOpen', e, { ...props, open: true }) } - const hideOnScroll = (e) => { - debug('hideOnScroll()') + const handleHideOnScroll = (e) => { + debug('handleHideOnScroll()') // Do not hide the popup when scroll comes from inside the popup // https://github.com/Semantic-Org/Semantic-UI-React/issues/4305 @@ -253,7 +254,7 @@ const Popup = React.forwardRef(function (props, ref) { ) : ( children )} - {hideOnScroll && } + {hideOnScroll && } )