Fixing automation issue - now autocolumns hidden there too.

This commit is contained in:
mike12345567 2021-02-16 18:58:59 +00:00
parent d700cc254c
commit 6e198a8ce1
1 changed files with 16 additions and 14 deletions

View File

@ -30,20 +30,22 @@
{#if schemaFields.length}
<div class="schema-fields">
{#each schemaFields as [field, schema]}
{#if schemaHasOptions(schema)}
<Select label={field} extraThin secondary bind:value={value[field]}>
<option value="">Choose an option</option>
{#each schema.constraints.inclusion as option}
<option value={option}>{option}</option>
{/each}
</Select>
{:else if schema.type === 'string' || schema.type === 'number'}
<BindableInput
extraThin
bind:value={value[field]}
label={field}
type="string"
{bindings} />
{#if !schema.autocolumn}
{#if schemaHasOptions(schema)}
<Select label={field} extraThin secondary bind:value={value[field]}>
<option value="">Choose an option</option>
{#each schema.constraints.inclusion as option}
<option value={option}>{option}</option>
{/each}
</Select>
{:else if schema.type === 'string' || schema.type === 'number'}
<BindableInput
extraThin
bind:value={value[field]}
label={field}
type="string"
{bindings} />
{/if}
{/if}
{/each}
</div>