From 8bb51113bc8a97d76e294421e984a401cb076e86 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Sat, 17 Sep 2022 10:45:44 +0100 Subject: [PATCH] Fix for #7811 - Fixing an issue with the query binding builder - when executing the query you could no longer enrich the value binding. --- .../integration/QueryBindingBuilder.svelte | 90 +++++++++++++------ .../components/integration/QueryViewer.svelte | 2 +- .../QueryViewerBindingBuilder.svelte | 69 ++++++++++++++ 3 files changed, 132 insertions(+), 29 deletions(-) create mode 100644 packages/builder/src/components/integration/QueryViewerBindingBuilder.svelte diff --git a/packages/builder/src/components/integration/QueryBindingBuilder.svelte b/packages/builder/src/components/integration/QueryBindingBuilder.svelte index 64736e5f78..255bee21dd 100644 --- a/packages/builder/src/components/integration/QueryBindingBuilder.svelte +++ b/packages/builder/src/components/integration/QueryBindingBuilder.svelte @@ -1,20 +1,31 @@ @@ -35,34 +46,57 @@ {/if}
- { - queryBindings = e.detail.map(binding => { - return { - name: binding.name, - default: binding.value, - } - }) - }} - /> + {#each queryBindings as binding, idx} + + onBindingChange(binding.name, evt.detail)} + bind:value={binding.default} + /> + {#if bindable} + onBindingChange(binding.name, evt.detail)} + value={runtimeToReadableBinding( + bindings, + customParams?.[binding.name] + )} + {bindings} + /> + {:else} + deleteQueryBinding(idx)} /> + {/if} + {/each}