Typescript FormBlock corrections
This commit is contained in:
parent
62aa06d3cb
commit
77cc665ae9
|
@ -4,12 +4,12 @@
|
|||
import { Utils } from "@budibase/frontend-core"
|
||||
import FormBlockWrapper from "./FormBlockWrapper.svelte"
|
||||
import { get } from "svelte/store"
|
||||
import { TableSchema, UIDatasource } from "@budibase/types"
|
||||
import { TableSchema } from "@budibase/types"
|
||||
|
||||
type Field = { name: string; active: boolean }
|
||||
|
||||
export let actionType: string
|
||||
export let dataSource: UIDatasource
|
||||
export let dataSource: { resourceId: string }
|
||||
export let size: string
|
||||
export let disabled: boolean
|
||||
export let fields: (Field | string)[]
|
||||
|
@ -30,8 +30,8 @@
|
|||
// Legacy
|
||||
export let showDeleteButton: boolean
|
||||
export let showSaveButton: boolean
|
||||
export let saveButtonLabel: boolean
|
||||
export let deleteButtonLabel: boolean
|
||||
export let saveButtonLabel: string
|
||||
export let deleteButtonLabel: string
|
||||
|
||||
const { fetchDatasourceSchema, generateGoldenSample } = getContext("sdk")
|
||||
const component = getContext("component")
|
||||
|
@ -107,7 +107,7 @@
|
|||
return [...fields, ...defaultFields].filter(field => field.active)
|
||||
}
|
||||
|
||||
const fetchSchema = async (datasource: UIDatasource) => {
|
||||
const fetchSchema = async (datasource: { resourceId: string }) => {
|
||||
schema = (await fetchDatasourceSchema(datasource)) || {}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue