1
0
Fork 0
mirror of synced 2024-07-12 09:45:48 +12:00

Display single attachment in form

This commit is contained in:
Adria Navarro 2024-03-26 14:08:44 +01:00
parent 6d5c47e0cc
commit f41da36995
2 changed files with 8 additions and 1 deletions

View file

@ -66,6 +66,11 @@
maximum: schema?.constraints?.length?.maximum,
}
},
[FieldType.ATTACHMENT_SINGLE]: () => {
return {
type: FieldType.ATTACHMENT_SINGLE,
}
},
}
const fieldSchema = getFieldSchema(field)

View file

@ -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={[]}