From 8309575a94e9ac8fb265c3768778987c282cc447 Mon Sep 17 00:00:00 2001 From: nitin <142569587+ehconitin@users.noreply.github.com> Date: Fri, 21 Mar 2025 03:05:48 +0530 Subject: [PATCH] Fix option text deletion in select fields by removing error for empty values (#11081) closes #11013 Fixes the issue where users couldn't delete all text in select field options. Removed the error throw for empty strings in the computeOptionValueFromLabel function, allowing proper text deletion. This error handling was redundant since the form validation already prevents submission with empty values. --- .../modules/settings/components/AdvancedSettingsWrapper.tsx | 3 ++- .../data-model/utils/compute-option-value-from-label.utils.ts | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx index 9eca18122..4aadc5f6c 100644 --- a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx +++ b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx @@ -48,13 +48,14 @@ export const AdvancedSettingsWrapper = ({ children, hideDot = false, dotPosition = 'centered', + animationDimension = 'height', }: AdvancedSettingsWrapperProps) => { const isAdvancedModeEnabled = useRecoilValue(isAdvancedModeEnabledState); return ( { allowedChars: 'a-zA-Z0-9_', }); - if (formattedString === '') { - throw new Error('Invalid label'); - } - return formattedString.toUpperCase(); };