Revert changes to MultiFieldSelect

This commit is contained in:
Andrew Kingston 2022-01-18 15:25:43 +00:00
parent c3450a3e1e
commit 6870c3067a
1 changed files with 1 additions and 12 deletions

View File

@ -19,7 +19,6 @@
let fieldApi
let fieldSchema
$: safeDefaultValue = getSafeDefaultValue(defaultValue)
$: flatOptions = optionsSource == null || optionsSource === "schema"
$: options = getOptions(
optionsSource,
@ -29,16 +28,6 @@
valueColumn,
customOptions
)
const getSafeDefaultValue = value => {
if (value == null || value === "") {
return []
}
if (!Array.isArray(value)) {
return [value]
}
return value
}
</script>
<Field
@ -46,7 +35,7 @@
{label}
{disabled}
{validation}
defaultValue={safeDefaultValue}
{defaultValue}
type="array"
bind:fieldState
bind:fieldApi