1
0
Fork 0
mirror of synced 2024-09-21 03:43:21 +12:00

Fix delete

This commit is contained in:
Mel O'Hagan 2022-08-25 19:07:13 +01:00
parent f2881fc714
commit 8a75b0a26d

View file

@ -67,7 +67,7 @@
{/if}
{:else if schema.type === QueryTypes.FLOW}
<br />
{#if query.fields.steps?.length == 0}
{#if (query.fields.steps?.length ?? 0) === 0}
<div class="controls">
<Button
secondary
@ -93,9 +93,8 @@
Stage {index + 1}
<ActionButton
on:click={() => {
query.fields.steps = [
...query.fields.steps.splice(index, 1),
]
query.fields.steps.splice(index, 1)
query.fields.steps = query.fields.steps
}}
icon="DeleteOutline"
/>
@ -109,14 +108,18 @@
query.fields.steps[index].key = detail
}}
/>
{#key query.fields.steps.length}
<Editor
editorHeight={height / 2}
mode="json"
value={step.value}
value={typeof step.value === "string"
? step.value
: step.value.value}
on:change={({ detail }) => {
query.fields.steps[index].value = detail
}}
/>
{/key}
</div>
</div>
</Layout>