Typescript FormBlock corrections

This commit is contained in:
Dean 2025-02-14 13:01:21 +00:00
parent 62aa06d3cb
commit 77cc665ae9
1 changed files with 5 additions and 5 deletions

View File

@ -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>