Merge pull request #764 from toeverything/fix/menu

fix: menu not hide when click over
This commit is contained in:
DarkSky 2023-02-01 23:49:48 +08:00 committed by GitHub
commit 55f9a8bd63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,6 +152,11 @@ export const Popper = ({
onPointerLeave={onPointerLeaveHandler}
style={popoverStyle}
className={popoverClassName}
onClick={() => {
if (hasClickTrigger && !visibleControlledByParent) {
setVisible(false);
}
}}
>
{showArrow && (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment