diff --git a/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte b/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte index 7a4bda3047..2d6e012736 100644 --- a/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/QueryParamSelector.svelte @@ -3,10 +3,23 @@ import { Select } from "@budibase/bbui" import DrawerBindableInput from "../../common/bindings/DrawerBindableInput.svelte" import AutomationBindingPanel from "../../common/bindings/ServerBindingPanel.svelte" + import { createEventDispatcher } from "svelte" + + const dispatch = createEventDispatcher() export let value export let bindings + const onChangeQuery = e => { + value.queryId = e.detail + dispatch("change", value) + } + + const onChange = (e, field) => { + value[field.name] = e.detail + dispatch("change", value) + } + $: query = $queries.list.find(query => query._id === value?.queryId) $: parameters = query?.parameters ?? [] @@ -18,7 +31,8 @@