Add data binding to nested fields within workflow block setup

This commit is contained in:
Andrew Kingston 2020-09-17 14:05:53 +01:00
parent 48f13af109
commit 57a8dcf595
1 changed files with 6 additions and 2 deletions

View File

@ -1,8 +1,11 @@
<script> <script>
import { backendUiStore } from "builderStore" import { backendUiStore } from "builderStore"
import { Input, Select, Label } from "@budibase/bbui" import { Input, Select, Label } from "@budibase/bbui"
import BindableInput from "../../../userInterface/BindableInput.svelte"
export let value export let value
export let bindings
$: model = $backendUiStore.models.find(model => model._id === value?.modelId) $: model = $backendUiStore.models.find(model => model._id === value?.modelId)
$: schemaFields = Object.entries(model?.schema ?? {}) $: schemaFields = Object.entries(model?.schema ?? {})
@ -47,11 +50,12 @@
{/each} {/each}
</Select> </Select>
{:else} {:else}
<Input <BindableInput
thin thin
value={value[field]} value={value[field]}
on:change={e => setParsedValue(e, field)}
label={field} label={field}
on:change={e => setParsedValue(e, field)} /> {bindings} />
{/if} {/if}
</div> </div>
{/each} {/each}