Browse Source

Allow to use select with radio buttons for boolean field type

master
Kacper 4 years ago
parent
commit
0089402798
  1. 9
      packages/client/src/components/app/forms/optionsParser.js

9
packages/client/src/components/app/forms/optionsParser.js

@ -40,6 +40,15 @@ export const getOptions = (
// Extract custom options // Extract custom options
if (optionsSource === "custom" && customOptions) { 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 return customOptions
} }

Loading…
Cancel
Save