From 65e4e3c492419b627a4026b1442b6fd4e8fe6708 Mon Sep 17 00:00:00 2001 From: prathameshpatil5181 Date: Fri, 18 Oct 2024 00:25:04 +0530 Subject: [PATCH] fix : 7223 Clicking Outside Fields domain link email phone Close Them --- .../meta-types/input/components/MultiItemFieldInput.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx index 7e3e93ec2c48..52c9cd1e662a 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx @@ -64,9 +64,14 @@ export const MultiItemFieldInput = ({ onCancel?.(); }; + const handleDropdownCloseOutside = (event: MouseEvent | TouchEvent) => { + onCancel?.(); + event.stopImmediatePropagation(); + }; + useListenClickOutside({ refs: [containerRef], - callback: handleDropdownClose, + callback: handleDropdownCloseOutside, }); useScopedHotkeys(Key.Escape, handleDropdownClose, hotkeyScope);