Merge pull request #5787 from Upgreydd/convert_text_to_boolean_for_custom_schema_in_select

Allow to use select for boolean field type
This commit is contained in:
Martin McKeaveney 2022-05-17 14:45:18 +01:00 committed by GitHub
commit c69df439a4
1 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,15 @@ export const getOptions = (
// Extract custom options
if (optionsSource === "custom" && customOptions) {
customOptions.forEach(option => {
if (typeof option.value === "string") {
if (option.value.toLowerCase() === "true") {
option.value = true
} else if (option.value.toLowerCase() === "false") {
option.value = false
}
}
})
return customOptions
}