Skip to content

The open alternative to Salesforce, designed for AI.

Fix:Empty link in record details isn't deleted by default (#9840)

Suhotra Dey0675017b5ed8
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 b1155570b76..a0359c215d1 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
@@ -128,6 +128,15 @@ export const MultiItemFieldInput = <T,>({
}
}
+ if (inputValue === '' && isAddingNewItem) {
+ return;
+ }
+
+ if (inputValue === '' && !isAddingNewItem) {
+ handleDeleteItem(itemToEditIndex);
+ return;
+ }
+
const newItem = formatInput
? formatInput(inputValue)
: (inputValue as unknown as T);