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.
This commit is contained in:
nitin
2025-03-21 03:05:48 +05:30
committed by GitHub
parent 872c0e97f6
commit 8309575a94
2 changed files with 2 additions and 5 deletions

View File

@ -48,13 +48,14 @@ export const AdvancedSettingsWrapper = ({
children,
hideDot = false,
dotPosition = 'centered',
animationDimension = 'height',
}: AdvancedSettingsWrapperProps) => {
const isAdvancedModeEnabled = useRecoilValue(isAdvancedModeEnabledState);
return (
<AnimatedExpandableContainer
isExpanded={isAdvancedModeEnabled}
dimension="height"
dimension={animationDimension}
animationDurations={ADVANCED_SETTINGS_ANIMATION_DURATION}
mode="scroll-height"
containAnimation={false}

View File

@ -9,9 +9,5 @@ export const computeOptionValueFromLabel = (label: string): string => {
allowedChars: 'a-zA-Z0-9_',
});
if (formattedString === '') {
throw new Error('Invalid label');
}
return formattedString.toUpperCase();
};