Display single attachment in form
This commit is contained in:
parent
6d5c47e0cc
commit
f41da36995
|
@ -66,6 +66,11 @@
|
||||||
maximum: schema?.constraints?.length?.maximum,
|
maximum: schema?.constraints?.length?.maximum,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
[FieldType.ATTACHMENT_SINGLE]: () => {
|
||||||
|
return {
|
||||||
|
type: FieldType.ATTACHMENT_SINGLE,
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const fieldSchema = getFieldSchema(field)
|
const fieldSchema = getFieldSchema(field)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import Field from "./Field.svelte"
|
import Field from "./Field.svelte"
|
||||||
import { CoreDropzone } from "@budibase/bbui"
|
import { CoreDropzone } from "@budibase/bbui"
|
||||||
|
import { FieldType } from "@budibase/types"
|
||||||
import { getContext } from "svelte"
|
import { getContext } from "svelte"
|
||||||
|
|
||||||
export let field
|
export let field
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
export let maximum = undefined
|
export let maximum = undefined
|
||||||
export let span
|
export let span
|
||||||
export let helpText = null
|
export let helpText = null
|
||||||
|
export let type = FieldType.ATTACHMENT
|
||||||
|
|
||||||
let fieldState
|
let fieldState
|
||||||
let fieldApi
|
let fieldApi
|
||||||
|
@ -78,7 +80,7 @@
|
||||||
{validation}
|
{validation}
|
||||||
{span}
|
{span}
|
||||||
{helpText}
|
{helpText}
|
||||||
type="attachment"
|
{type}
|
||||||
bind:fieldState
|
bind:fieldState
|
||||||
bind:fieldApi
|
bind:fieldApi
|
||||||
defaultValue={[]}
|
defaultValue={[]}
|
||||||
|
|
Loading…
Reference in New Issue