From e69131790c67a8f144ba922504aeb6b94f69904b Mon Sep 17 00:00:00 2001 From: Thomas Trompette Date: Tue, 16 Sep 2025 17:08:44 +0200 Subject: [PATCH] Put back previous empty option (#14542) Adding that option puts No Value everywhere. Removing it. --- .../form-types/components/FormSelectFieldInput.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx index eca7f7992d..cac2cb6beb 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx @@ -13,6 +13,7 @@ import { useTheme } from '@emotion/react'; import { useId, useState } from 'react'; import { Key } from 'ts-key-enum'; import { isDefined } from 'twenty-shared/utils'; +import { IconCircleOff } from 'twenty-ui/display'; import { type SelectOption } from 'twenty-ui/input'; type FormSelectFieldInputProps = { @@ -94,16 +95,9 @@ export const FormSelectFieldInput = ({ const defaultEmptyOption = { label: `No ${label ?? 'value'}`, value: '', + icon: IconCircleOff, }; - const existingEmptyOption = options.find( - (option) => !isDefined(option.value) || option.value === '', - ); - - const optionsWithEmptyOption = isDefined(existingEmptyOption) - ? options - : [defaultEmptyOption, ...options]; - const handleUnlinkVariable = () => { setDraftValue({ type: 'static', @@ -138,10 +132,10 @@ export const FormSelectFieldInput = ({ {draftValue.type === 'static' ? (