From d0197730d5e20a4308538e13ba6b8bc785aa3b4b Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 18 Sep 2023 11:42:41 +0200 Subject: [PATCH] Fix initial references --- .../backend/DataTable/modals/CreateEditColumn.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index a00448c918..6a9c59ca01 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -46,7 +46,7 @@ const DATE_TYPE = FIELDS.DATETIME.type const BB_REFERENCE_TYPE = FieldType.BB_REFERENCE const BB_USER_REFERENCE_TYPE = composeType( - FieldType.BB_REFERENCE, + BB_REFERENCE_TYPE, FieldSubtype.USER ) @@ -107,8 +107,6 @@ {} ) - $: isBBReference = !!bbRefTypeMapping[editableColumn.type] - $: if (primaryDisplay) { editableColumn.constraints.presence = { allowEmpty: false } } @@ -153,6 +151,8 @@ $: initialiseField(field, savingColumn) + $: isBBReference = !!bbRefTypeMapping[editableColumn.type] + $: checkConstraints(editableColumn) $: required = !!editableColumn?.constraints?.presence || primaryDisplay $: uneditable =