1
0
Fork 0
mirror of synced 2024-06-29 19:41:03 +12:00

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 71fdb69cde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}