Refresh BindingBuilder if query.parameters changes
This commit is contained in:
parent
0faf4e78ba
commit
2ff3cb5fcc
|
@ -132,7 +132,15 @@
|
|||
config={integrationInfo.extra}
|
||||
/>
|
||||
{/if}
|
||||
<BindingBuilder bind:queryBindings={query.parameters} bindable={false} />
|
||||
{#key query.parameters}
|
||||
<BindingBuilder
|
||||
queryBindings={query.parameters}
|
||||
bindable={false}
|
||||
on:change={e => {
|
||||
query.parameters = e.detail
|
||||
}}
|
||||
/>
|
||||
{/key}
|
||||
{/if}
|
||||
</div>
|
||||
{#if shouldShowQueryConfig}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { Body, Button, Heading, Layout } from "@budibase/bbui"
|
||||
import KeyValueBuilder from "components/integration/KeyValueBuilder.svelte"
|
||||
import { getUserBindings } from "builderStore/dataBinding"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
export let bindable = true
|
||||
export let queryBindings = []
|
||||
|
||||
|
@ -11,6 +12,7 @@
|
|||
acc[binding.name] = binding.default
|
||||
return acc
|
||||
}, {})
|
||||
let dispatch = createEventDispatcher()
|
||||
|
||||
function newQueryBinding() {
|
||||
queryBindings = [...queryBindings, {}]
|
||||
|
@ -45,12 +47,15 @@
|
|||
bindings={[...userBindings]}
|
||||
bindingDrawerLeft="260px"
|
||||
on:change={e => {
|
||||
queryBindings = e.detail.map(binding => {
|
||||
dispatch(
|
||||
"change",
|
||||
e.detail.map(binding => {
|
||||
return {
|
||||
name: binding.name,
|
||||
default: binding.value,
|
||||
}
|
||||
})
|
||||
)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue