feat: simplification of default-value specification in FieldMetadata (#4592)
* feat: wip refactor default-value * feat: health check to migrate default value * fix: tests * fix: refactor defaultValue to make it more clean * fix: unit tests * fix: front-end default value
This commit is contained in:
@ -74,7 +74,7 @@ describe('formatFieldMetadataItemInput', () => {
|
||||
value: 'OPTION_2',
|
||||
},
|
||||
],
|
||||
defaultValue: 'OPTION_1',
|
||||
defaultValue: "'OPTION_1'",
|
||||
};
|
||||
|
||||
const result = formatFieldMetadataItemInput(input);
|
||||
|
||||
@ -44,7 +44,7 @@ export const formatFieldMetadataItemInput = (
|
||||
|
||||
return {
|
||||
defaultValue: defaultOption
|
||||
? getOptionValueFromLabel(defaultOption.label)
|
||||
? `'${getOptionValueFromLabel(defaultOption.label)}'`
|
||||
: undefined,
|
||||
description: input.description?.trim() ?? null,
|
||||
icon: input.icon,
|
||||
|
||||
Reference in New Issue
Block a user