diff --git a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte index 6846c3d8d8..44e592a0b1 100644 --- a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte +++ b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte @@ -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