From f15c5e5b585d1121e1f631ee3f06d69335ed8b57 Mon Sep 17 00:00:00 2001 From: nitin <142569587+ehconitin@users.noreply.github.com> Date: Mon, 2 Sep 2024 21:20:54 +0530 Subject: [PATCH] Updated MultiItemFieldInput to display current value properly (#6857) --- .../meta-types/input/components/MultiItemFieldInput.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 b223abfcff13..b2a94f117abc 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 @@ -48,7 +48,6 @@ export const MultiItemFieldInput = ({ hotkeyScope, }: MultiItemFieldInputProps) => { const containerRef = useRef(null); - const handleDropdownClose = () => { onCancel?.(); }; @@ -71,8 +70,9 @@ export const MultiItemFieldInput = ({ }; const handleEditButtonClick = (index: number) => { + const item = items[index] as { label: string; url: string }; setItemToEditIndex(index); - setInputValue((items[index] as unknown as string) || ''); + setInputValue(item.url || ''); setIsInputDisplayed(true); };