packages/builder/src/components/backend/DataTable/DataTable.svelte

This commit is contained in:
Dean 2023-07-25 14:32:21 +01:00
parent e8dd3f9d90
commit f813a26ff0
1 changed files with 3 additions and 3 deletions

View File

@ -28,16 +28,16 @@
$: isInternal = $tables.selected?.type !== "external" $: isInternal = $tables.selected?.type !== "external"
$: datasource = $datasources.list.find(datasource => { $: datasource = $datasources.list.find(datasource => {
return datasource._id === $tables.selected.sourceId return datasource._id === $tables.selected?.sourceId
}) })
$: relationshipsEnabled = relationshipSupport(datasource)
const relationshipSupport = datasource => { const relationshipSupport = datasource => {
const integration = $integrations[datasource?.source] const integration = $integrations[datasource?.source]
return !isInternal && integration?.relationships !== false return !isInternal && integration?.relationships !== false
} }
$: relationshipsEnabled = relationshipSupport(datasource)
const handleGridTableUpdate = async e => { const handleGridTableUpdate = async e => {
tables.replaceTable(id, e.detail) tables.replaceTable(id, e.detail)