diff --git a/packages/builder/src/components/database/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/database/DataTable/modals/CreateEditColumn.svelte index f4c60fc8e1..f71db9aada 100644 --- a/packages/builder/src/components/database/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/database/DataTable/modals/CreateEditColumn.svelte @@ -46,6 +46,7 @@ const { type, constraints } = fieldDefinitions[ event.target.value.toUpperCase() ] + field.type = type field.constraints = constraints } @@ -58,9 +59,9 @@ secondary thin on:change={handleFieldConstraints} - bind:value={field.value}> + bind:value={field.type}> {#each Object.values(fieldDefinitions) as field} - + {/each} @@ -73,28 +74,28 @@ on:change={() => (field.constraints.presence.allowEmpty = required)} /> - {#if field.value === 'string' && field.constraints} + {#if field.type === 'string' && field.constraints} - {:else if field.value === 'datetime' && field.constraints} + {:else if field.type === 'datetime' && field.constraints} - {:else if field.value === 'number' && field.constraints} + {:else if field.type === 'number' && field.constraints} - {:else if field.value === 'link'} + {:else if field.type === 'link'}