Fix: Custom menu item not automatically closing, affecting delete popup behavior. (#2771)

This commit is contained in:
Prateek Shourya 2023-11-14 23:05:30 +05:30 committed by GitHub
parent b60237b676
commit 7f42566207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,10 @@ const MenuItem: React.FC<ICustomMenuItemProps> = (props) => {
className={`w-full select-none truncate rounded px-1 py-1.5 text-left text-custom-text-200 hover:bg-custom-background-80 ${
active ? "bg-custom-background-80" : ""
} ${className}`}
onClick={onClick}
onClick={(e) => {
close();
onClick && onClick(e);
}}
>
{children}
</button>