Fix delete
This commit is contained in:
parent
c8330622e3
commit
dd8b116a91
|
@ -67,7 +67,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
{:else if schema.type === QueryTypes.FLOW}
|
{:else if schema.type === QueryTypes.FLOW}
|
||||||
<br />
|
<br />
|
||||||
{#if query.fields.steps?.length == 0}
|
{#if (query.fields.steps?.length ?? 0) === 0}
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<Button
|
<Button
|
||||||
secondary
|
secondary
|
||||||
|
@ -93,9 +93,8 @@
|
||||||
Stage {index + 1}
|
Stage {index + 1}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
on:click={() => {
|
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"
|
icon="DeleteOutline"
|
||||||
/>
|
/>
|
||||||
|
@ -109,14 +108,18 @@
|
||||||
query.fields.steps[index].key = detail
|
query.fields.steps[index].key = detail
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{#key query.fields.steps.length}
|
||||||
<Editor
|
<Editor
|
||||||
editorHeight={height / 2}
|
editorHeight={height / 2}
|
||||||
mode="json"
|
mode="json"
|
||||||
value={step.value}
|
value={typeof step.value === "string"
|
||||||
|
? step.value
|
||||||
|
: step.value.value}
|
||||||
on:change={({ detail }) => {
|
on:change={({ detail }) => {
|
||||||
query.fields.steps[index].value = detail
|
query.fields.steps[index].value = detail
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{/key}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
Loading…
Reference in New Issue