From d158fe81937d27c08c86f37876e859e1f6543ccb Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Tue, 14 Nov 2023 23:05:30 +0530 Subject: [PATCH] Fix: Custom menu item not automatically closing, affecting delete popup behavior. (#2771) --- packages/ui/src/dropdowns/custom-menu.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/dropdowns/custom-menu.tsx b/packages/ui/src/dropdowns/custom-menu.tsx index 0e8d50064..360c53ad6 100644 --- a/packages/ui/src/dropdowns/custom-menu.tsx +++ b/packages/ui/src/dropdowns/custom-menu.tsx @@ -138,7 +138,10 @@ const MenuItem: React.FC = (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}