diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte
index ba72fd2ed7..a085d86507 100644
--- a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte
+++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte
@@ -73,9 +73,12 @@
{#if query?.parameters?.length > 0}
{
+ parameters.queryParams = { ...v.detail }
+ }}
/>
{
- tmpQueryParams = value.queryParams
+ tmpQueryParams = { ...value.queryParams }
drawer.show()
}
const getQueryValue = queries => {
- value = queries.find(q => q._id === value._id) || value
- return value
+ return queries.find(q => q._id === value._id) || value
}
const saveQueryParams = () => {
@@ -176,7 +175,10 @@
{#if getQueryParams(value).length > 0}
{
+ tmpQueryParams = { ...v.detail }
+ }}
queryBindings={getQueryParams(value)}
bind:bindings
/>
diff --git a/packages/builder/src/components/integration/QueryBindingBuilder.svelte b/packages/builder/src/components/integration/QueryBindingBuilder.svelte
index 3a89c4b968..af890302b0 100644
--- a/packages/builder/src/components/integration/QueryBindingBuilder.svelte
+++ b/packages/builder/src/components/integration/QueryBindingBuilder.svelte
@@ -5,6 +5,9 @@
runtimeToReadableBinding,
} from "builderStore/dataBinding"
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
+ import { createEventDispatcher } from "svelte"
+
+ const dispatch = createEventDispatcher()
export let bindable = true
export let queryBindings = []
@@ -20,7 +23,10 @@
// The readable binding in the UI gets converted to a UUID value that the client understands
// for parsing, then converted back so we can display it the readable form in the UI
function onBindingChange(param, valueToParse) {
- customParams[param] = readableToRuntimeBinding(bindings, valueToParse)
+ dispatch("change", {
+ ...customParams,
+ [param]: readableToRuntimeBinding(bindings, valueToParse),
+ })
}