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