PR comments
This commit is contained in:
parent
4ca090bf10
commit
f69056c9fe
|
@ -70,6 +70,7 @@ const componentMap = {
|
|||
"field/longform": FormFieldSelect,
|
||||
"field/datetime": FormFieldSelect,
|
||||
"field/attachment": FormFieldSelect,
|
||||
"field/attachment_single": FormFieldSelect,
|
||||
"field/s3": Input,
|
||||
"field/link": FormFieldSelect,
|
||||
"field/array": FormFieldSelect,
|
||||
|
|
|
@ -4354,12 +4354,6 @@
|
|||
"label": "Extensions",
|
||||
"key": "extensions"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"label": "Max attachments",
|
||||
"key": "maximum",
|
||||
"min": 1
|
||||
},
|
||||
{
|
||||
"type": "event",
|
||||
"label": "On change",
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
get: value => value,
|
||||
set: value => value,
|
||||
}
|
||||
export let defaultValue = []
|
||||
|
||||
let fieldState
|
||||
let fieldApi
|
||||
|
@ -88,7 +89,7 @@
|
|||
{type}
|
||||
bind:fieldState
|
||||
bind:fieldApi
|
||||
defaultValue={[]}
|
||||
{defaultValue}
|
||||
>
|
||||
{#if fieldState}
|
||||
<CoreDropzone
|
||||
|
|
|
@ -12,5 +12,6 @@
|
|||
{...$$restProps}
|
||||
type={FieldType.ATTACHMENT_SINGLE}
|
||||
maximum={1}
|
||||
defaultValue={null}
|
||||
{fieldApiMapper}
|
||||
/>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
export let value
|
||||
export let onChange
|
||||
export let api
|
||||
|
||||
$: arrayValue = (!Array.isArray(value) && value ? [value] : value) || []
|
||||
|
||||
|
@ -13,6 +14,7 @@
|
|||
</script>
|
||||
|
||||
<AttachmentCell
|
||||
bind:api
|
||||
{...$$restProps}
|
||||
maximum={1}
|
||||
value={arrayValue}
|
||||
|
|
Loading…
Reference in New Issue