Fix button action drawer not saving and crashing
This commit is contained in:
parent
8aa0f0513d
commit
09a9f2b806
|
@ -13,13 +13,12 @@
|
||||||
|
|
||||||
const EVENT_TYPE_KEY = "##eventHandlerType"
|
const EVENT_TYPE_KEY = "##eventHandlerType"
|
||||||
|
|
||||||
export let event
|
export let actions
|
||||||
|
|
||||||
let addActionButton
|
let addActionButton
|
||||||
let addActionDropdown
|
let addActionDropdown
|
||||||
let selectedAction
|
let selectedAction
|
||||||
|
|
||||||
$: actions = event || []
|
|
||||||
$: selectedActionComponent =
|
$: selectedActionComponent =
|
||||||
selectedAction &&
|
selectedAction &&
|
||||||
actionTypes.find(t => t.name === selectedAction[EVENT_TYPE_KEY]).component
|
actionTypes.find(t => t.name === selectedAction[EVENT_TYPE_KEY]).component
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export let value
|
export let value []
|
||||||
export let name
|
export let name
|
||||||
|
|
||||||
let drawer
|
let drawer
|
||||||
|
@ -63,6 +63,6 @@
|
||||||
<Button thin blue on:click={saveEventData}>Save</Button>
|
<Button thin blue on:click={saveEventData}>Save</Button>
|
||||||
</heading>
|
</heading>
|
||||||
<div slot="body">
|
<div slot="body">
|
||||||
<EventEditor event={value} eventType={name} />
|
<EventEditor bind:actions={value} eventType={name} />
|
||||||
</div>
|
</div>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
|
|
Loading…
Reference in New Issue