From 06c8e5f815bce7ce7bfa7a733748a750d31a4ab6 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 24 Sep 2024 12:47:51 +0100 Subject: [PATCH] Fix primary display schemas when saving --- .../backend/DataTable/modals/CreateEditColumn.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index b04ccdb6a9..1460f92da5 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -296,6 +296,12 @@ delete saveColumn.default } + // Ensure primary display columns are always required and don't have default values + if (primaryDisplay) { + saveColumn.constraints.presence = true + delete saveColumn.default + } + try { await tables.saveField({ originalName,