From d78e2c8d9486ecabd02bccdce85ad757606b7d6f Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 27 Nov 2020 15:24:43 +0000 Subject: [PATCH] allow creation of username --- .../src/components/backend/DataTable/RowFieldControl.svelte | 6 ++++-- .../backend/DataTable/modals/CreateEditRowModal.svelte | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte index f18c81afc7..c21d3449b6 100644 --- a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte +++ b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte @@ -7,11 +7,13 @@ import LinkedRowSelector from "components/common/LinkedRowSelector.svelte" export let meta + export let creating export let value = meta.type === "boolean" ? false : "" $: type = meta.type $: label = capitalise(meta.name) - $: userTableSelected = $backendUiStore.selectedTable?._id === TableNames.USERS + $: editingUser = + !creating && $backendUiStore.selectedTable?._id === TableNames.USERS {#if type === 'options'} @@ -39,5 +41,5 @@ data-cy="{meta.name}-input" {type} bind:value - disabled={userTableSelected} /> + disabled={editingUser} /> {/if} diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditRowModal.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditRowModal.svelte index 460c04428e..c4b8888cd2 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditRowModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditRowModal.svelte @@ -47,7 +47,7 @@ {/if} {#each tableSchema as [key, meta]}
- +
{/each}