From c44ba8b995d3dff1e4d2eb0d4b7d945780d020aa Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 16 Sep 2020 14:38:18 +0100 Subject: [PATCH] Use bbui selects for all selects in workflow steps --- .../ParamInputs/ModelSelector.svelte | 5 +- .../ParamInputs/RecordSelector.svelte | 46 ++++++++++++++----- .../SetupPanel/WorkflowBlockSetup.svelte | 2 +- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/packages/builder/src/components/workflow/SetupPanel/ParamInputs/ModelSelector.svelte b/packages/builder/src/components/workflow/SetupPanel/ParamInputs/ModelSelector.svelte index e95306306e..8251e605c3 100644 --- a/packages/builder/src/components/workflow/SetupPanel/ParamInputs/ModelSelector.svelte +++ b/packages/builder/src/components/workflow/SetupPanel/ParamInputs/ModelSelector.svelte @@ -1,14 +1,15 @@
- {#each $backendUiStore.models as model} {/each} - +
diff --git a/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte b/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte index 809d5847b5..f0b278da89 100644 --- a/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte +++ b/packages/builder/src/components/workflow/SetupPanel/ParamInputs/RecordSelector.svelte @@ -1,11 +1,11 @@
- {#each $backendUiStore.models as model} {/each} - +
{#if schemaFields.length}
- {#each schemaFields as field} + {#each schemaFields as [field, schema]}
- setParsedValue(e, field)} /> + {#if schema.constraints?.inclusion?.length} +
{field}
+ + {:else} + setParsedValue(e, field)} /> + {/if}
{/each}
{/if} diff --git a/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte b/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte index 79057fd845..ea11199c69 100644 --- a/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte +++ b/packages/builder/src/components/workflow/SetupPanel/WorkflowBlockSetup.svelte @@ -12,7 +12,7 @@ {#each inputs as [key, value]}
{value.title}
- {#if value.type === 'string' && value.enum} + {#if value.type === 'string' && value.enum?.length}