fix: popover behaviour when clicking outside of popover (#1355)

This commit is contained in:
Aman Harwara
2022-07-27 20:52:08 +05:30
committed by GitHub
parent 8c364f6d58
commit 58e751f986
4 changed files with 69 additions and 7 deletions

View File

@@ -15,7 +15,9 @@ const PositionedPopoverContent = ({
anchorElement,
anchorPoint,
children,
childPopovers,
className,
id,
overrideZIndex,
side = 'bottom',
togglePopover,
@@ -44,6 +46,7 @@ const PositionedPopoverContent = ({
popoverElement,
anchorElement,
togglePopover,
childPopovers,
})
return (
@@ -61,7 +64,7 @@ const PositionedPopoverContent = ({
ref={(node) => {
setPopoverElement(node)
}}
data-popover
data-popover={id}
>
<div className="md:hidden">
<div className="flex items-center justify-end px-3">