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