Fix to ensure an appropriate internal source is selected when creating an internal table

This commit is contained in:
Dean 2022-11-15 12:18:04 +00:00
parent ebccc21e7f
commit 0b75f6036d
1 changed files with 8 additions and 1 deletions

View File

@ -15,7 +15,14 @@
import { buildAutoColumn, getAutoColumnInformation } from "builderStore/utils"
$: tableNames = $tables.list.map(table => table.name)
$: targetDatasourceId = $datasources.selected
$: selectedSource = $datasources.list.find(
source => source._id === $datasources.selected
)
$: isSelectedInternal = selectedSource?.type === "budibase"
$: targetDatasourceId = isSelectedInternal
? selectedSource._id
: "bb_internal"
export let name
let dataImport