Merge pull request #2252 from Budibase/fix/action-bindings

Fix bindings not appearing in certain button actions
This commit is contained in:
Andrew Kingston 2021-08-04 09:59:37 +01:00 committed by GitHub
commit 8ca5fb67ac
3 changed files with 8 additions and 3 deletions

View File

@ -9,6 +9,7 @@
export let value = [] export let value = []
export let name export let name
export let bindings
let drawer let drawer
@ -57,5 +58,5 @@
Define what actions to run. Define what actions to run.
</svelte:fragment> </svelte:fragment>
<Button cta slot="buttons" on:click={saveEventData}>Save</Button> <Button cta slot="buttons" on:click={saveEventData}>Save</Button>
<EventEditor slot="body" bind:actions={value} eventType={name} /> <EventEditor slot="body" bind:actions={value} eventType={name} {bindings} />
</Drawer> </Drawer>

View File

@ -9,6 +9,7 @@
import SaveFields from "./SaveFields.svelte" import SaveFields from "./SaveFields.svelte"
export let parameters export let parameters
export let bindings = []
$: dataProviderComponents = getDataProviderComponents( $: dataProviderComponents = getDataProviderComponents(
$currentAsset, $currentAsset,
@ -70,6 +71,7 @@
parameterFields={parameters.fields} parameterFields={parameters.fields}
{schemaFields} {schemaFields}
on:change={onFieldsChanged} on:change={onFieldsChanged}
{bindings}
/> />
</div> </div>
{/if} {/if}

View File

@ -3,13 +3,14 @@
import { automationStore } from "builderStore" import { automationStore } from "builderStore"
import SaveFields from "./SaveFields.svelte" import SaveFields from "./SaveFields.svelte"
export let parameters = {}
export let bindings = []
const AUTOMATION_STATUS = { const AUTOMATION_STATUS = {
NEW: "new", NEW: "new",
EXISTING: "existing", EXISTING: "existing",
} }
export let parameters = {}
let automationStatus = parameters.automationId let automationStatus = parameters.automationId
? AUTOMATION_STATUS.EXISTING ? AUTOMATION_STATUS.EXISTING
: AUTOMATION_STATUS.NEW : AUTOMATION_STATUS.NEW
@ -109,6 +110,7 @@
parameterFields={parameters.fields} parameterFields={parameters.fields}
fieldLabel="Field" fieldLabel="Field"
on:change={onFieldsChanged} on:change={onFieldsChanged}
{bindings}
/> />
{/key} {/key}
</div> </div>