Browse Source

Revert changes to MultiFieldSelect

pull/4434/head
Andrew Kingston 5 years ago
parent
commit
6870c3067a
  1. 13
      packages/client/src/components/app/forms/MultiFieldSelect.svelte

13
packages/client/src/components/app/forms/MultiFieldSelect.svelte

@ -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…
Cancel
Save