Revert changes to MultiFieldSelect

This commit is contained in:
Andrew Kingston 2022-01-18 15:25:43 +00:00 committed by mike12345567
parent c578dedd51
commit 858d7b4b5a
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