Revert changes to MultiFieldSelect
This commit is contained in:
parent
c578dedd51
commit
858d7b4b5a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue