Fixes for #4736 - I believe the issue was that the dynamic variables were not being saved, removing the need for the user to be aware of this, also making it possible to pass the entire data structure from one call to another if desired.
This commit is contained in:
parent
1cc60bd404
commit
159cc9d277
|
@ -1,5 +1,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { Input, ModalContent, Modal, Body } from "@budibase/bbui"
|
import { Input, ModalContent, Modal, Body } from "@budibase/bbui"
|
||||||
|
import { createEventDispatcher } from "svelte"
|
||||||
|
|
||||||
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export let dynamicVariables
|
export let dynamicVariables
|
||||||
export let datasource
|
export let datasource
|
||||||
|
@ -35,6 +38,7 @@
|
||||||
name = null
|
name = null
|
||||||
binding = null
|
binding = null
|
||||||
dynamicVariables[copiedName] = copiedBinding
|
dynamicVariables[copiedName] = copiedBinding
|
||||||
|
dispatch("change", dynamicVariables)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -299,6 +299,7 @@
|
||||||
{dynamicVariables}
|
{dynamicVariables}
|
||||||
bind:binding={varBinding}
|
bind:binding={varBinding}
|
||||||
bind:this={addVariableModal}
|
bind:this={addVariableModal}
|
||||||
|
on:change={saveQuery}
|
||||||
/>
|
/>
|
||||||
{#if query && queryConfig}
|
{#if query && queryConfig}
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
|
|
@ -25,7 +25,7 @@ const HELPERS = [
|
||||||
if (
|
if (
|
||||||
value != null &&
|
value != null &&
|
||||||
typeof value === "object" &&
|
typeof value === "object" &&
|
||||||
value.toString() === "[object Object]"
|
(value.toString() === "[object Object]" || Array.isArray(value))
|
||||||
) {
|
) {
|
||||||
return new SafeString(JSON.stringify(value))
|
return new SafeString(JSON.stringify(value))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue