fix: fix Settings field form validation for certain field types (#5335)
Related to #4295 Following #5326, field types other than: - `FieldMetadataType.Boolean` - `FieldMetadataType.Currency` - `FieldMetadataType.Relation` - `FieldMetadataType.Select` - `FieldMetadataType.MultiSelect` Cannot be saved as they are not included in the form validation schema. This PR makes sure they are included and can therefore be created/edited.
This commit is contained in:
@ -211,7 +211,8 @@ export const SettingsObjectNewFieldStep2 = () => {
|
||||
const createdMetadataField = await createMetadataField({
|
||||
...formValues,
|
||||
defaultValue:
|
||||
formValues.type === FieldMetadataType.Currency
|
||||
formValues.type === FieldMetadataType.Currency &&
|
||||
'defaultValue' in formValues
|
||||
? {
|
||||
...formValues.defaultValue,
|
||||
amountMicros: null,
|
||||
|
||||
Reference in New Issue
Block a user