Fix display empty value if boolean instead of false on show page (#4468)

* default value boolean fixed

* fixed creation, fixed updating a value to false

* fixed default value for default value if boolean

* fixed tests

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
brendanlaschke
2024-03-30 11:38:08 +01:00
committed by GitHub
parent 1d351a29b8
commit da8f1b0a66
11 changed files with 136 additions and 15 deletions

View File

@ -45,7 +45,7 @@ export const formatFieldMetadataItemInput = (
return {
defaultValue: defaultOption
? `'${getOptionValueFromLabel(defaultOption.label)}'`
: undefined,
: input.defaultValue,
description: input.description?.trim() ?? null,
icon: input.icon,
label: input.label.trim(),