diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 4d57311f5f..dae22dbf1b 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -252,7 +252,7 @@ export const getSchemaForDatasource = (datasource, isForm = false) => { if (datasource) { const { type } = datasource if (type === "query") { - const queries = get(queriesStores).queries + const queries = get(queriesStores).list table = queries.find(query => query._id === datasource._id) } else { const tables = get(tablesStore).list diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte index 460267f561..4cfbce4da0 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte @@ -1,5 +1,5 @@ - - query.datasourceId === datasource._id)} - getOptionLabel={query => query.name} - getOptionValue={query => query._id} /> -{/if} + bind:value={parameters.datasourceId} + option={$datasources.list} + getOptionLabel={(source) => source.name} + getOptionValue={(source) => source._id} + /> - + {#if parameters.datasourceId} + +