Skip to content

Commit baa12c2

Browse files
authored
fix(console): should be able to clear the label of custom data field (#7682)
1 parent 9ba0485 commit baa12c2

File tree

1 file changed

+2
-1
lines changed
  • packages/console/src/pages/SignInExperience/PageContent/components/ProfileFieldPartSubForm

1 file changed

+2
-1
lines changed

packages/console/src/pages/SignInExperience/PageContent/components/ProfileFieldPartSubForm/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,13 @@ function ProfileFieldPartSubForm({ index }: Props) {
121121
}),
122122
}}
123123
render={({ field: { value, onChange } }) => {
124+
const fallbackValue = isBuiltInFieldName ? getI18nLabel(name) : '';
124125
return (
125126
<TextInput
126127
disabled={isBuiltInFieldName}
127128
error={formErrors?.label?.message}
128129
placeholder={t('sign_in_exp.custom_profile_fields.details.label_placeholder')}
129-
value={value || getI18nLabel(name)}
130+
value={value || fallbackValue}
130131
onChange={onChange}
131132
/>
132133
);

0 commit comments

Comments
 (0)