diff --git a/packages/standard-components/src/forms/BooleanField.svelte b/packages/standard-components/src/forms/BooleanField.svelte index 17a3c563bc..1ac602ea40 100644 --- a/packages/standard-components/src/forms/BooleanField.svelte +++ b/packages/standard-components/src/forms/BooleanField.svelte @@ -6,19 +6,33 @@ export let label export let text export let disabled = false + export let defaultValue let fieldState let fieldApi + + const isTruthy = value => { + if (!value) { + return false + } + if (value === true) { + return true + } + if (typeof value === "string" && value.toLowerCase() === "true") { + return true + } + return false + } {#if fieldState}