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