Przeglądaj źródła

fix(dashboard): Fix custom field label

Michael Bromley 5 miesięcy temu
rodzic
commit
45d4b3c30a

+ 3 - 3
packages/dashboard/src/lib/components/shared/custom-fields-form.tsx

@@ -229,7 +229,7 @@ function CustomFieldItem({ fieldDef, control, fieldName, getTranslation }: Reado
                         name={fieldName}
                         render={({ field }) => (
                             <FormItem>
-                                <FormLabel>{getTranslation(fieldDef.label) ?? field.name}</FormLabel>
+                                <FormLabel>{getTranslation(fieldDef.label) ?? fieldDef.name}</FormLabel>
                                 <FormControl>
                                     <CustomFieldListInput
                                         field={field}
@@ -263,7 +263,7 @@ function CustomFieldItem({ fieldDef, control, fieldName, getTranslation }: Reado
                     name={fieldName}
                     render={({ field }) => (
                         <FormItem>
-                            <FormLabel>{getTranslation(fieldDef.label) ?? field.name}</FormLabel>
+                            <FormLabel>{getTranslation(fieldDef.label) ?? fieldDef.name}</FormLabel>
                             <FormControl>
                                 <StructFormInput
                                     field={field}
@@ -291,7 +291,7 @@ function CustomFieldItem({ fieldDef, control, fieldName, getTranslation }: Reado
                     <CustomFieldFormItem
                         fieldDef={fieldDef}
                         getTranslation={getTranslation}
-                        fieldName={field.name}
+                        fieldName={fieldDef.name}
                     >
                         <FormInputForType fieldDef={fieldDef} field={field} />
                     </CustomFieldFormItem>