From 96c2f5477c5cb490d7bf54f6b5bd8f96f6a698cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Fri, 13 Jun 2025 14:50:30 +0200 Subject: [PATCH] Trigger search on mouse up (#12595) This fixes one of the issues in https://github.com/twentyhq/core-team-issues/issues/1093. See discussion in https://github.com/twentyhq/twenty/pull/12577 https://github.com/user-attachments/assets/f02a8b06-6246-4c9e-b1f2-8d8ce5091cdc --- .../MainNavigationDrawerFixedItems.tsx | 1 + .../components/NavigationDrawerItem.tsx | 24 ++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerFixedItems.tsx b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerFixedItems.tsx index b588f0287..bc9d27101 100644 --- a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerFixedItems.tsx +++ b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerFixedItems.tsx @@ -37,6 +37,7 @@ export const MainNavigationDrawerFixedItems = () => { Icon={IconSearch} onClick={openRecordsSearchPage} keyboard={['/']} + mouseUpNavigation={true} /> { const theme = useTheme(); const isMobile = useIsMobile(); @@ -268,20 +270,24 @@ export const NavigationDrawerItem = ({ } }; - const { onClick: handleClick, onMouseDown: handleMouseDown } = - useMouseDownNavigation({ - to, - onClick, - onBeforeNavigation: handleMobileNavigation, - triggerEvent, - }); + const { + onClick: handleMouseDownNavigationClickClick, + onMouseDown: handleMouseDown, + } = useMouseDownNavigation({ + to, + onClick, + onBeforeNavigation: handleMobileNavigation, + triggerEvent, + }); return (