packages/builder/src/components/backend/DataTable/DataTable.svelte
This commit is contained in:
parent
e8dd3f9d90
commit
f813a26ff0
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue