diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/modals/CreateExternalTableModal.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/modals/CreateExternalTableModal.svelte index c7a040d89a..1d9e246d20 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/modals/CreateExternalTableModal.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/modals/CreateExternalTableModal.svelte @@ -6,8 +6,9 @@ export let datasource let name = "" - - $: valid = name && name.length > 0 + $: valid = name && name.length > 0 && !datasource?.entities[name] + $: error = + name && datasource?.entities[name] ? "Table name already in use." : null function buildDefaultTable(tableName, datasourceId) { return { @@ -40,5 +41,5 @@
Provide a name for your new table; you can add columns once it is created. - +