From 544306ecda4b7664226c08d167ff3d89cff12715 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 3 Apr 2020 12:56:17 +0100 Subject: [PATCH] fixing record saving bug --- .../database/ModelDataTable/modals/CreateEditRecord.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte index 99c7e78116..7ad7f7419f 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte +++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte @@ -18,6 +18,7 @@ export let onClosed let errors = [] + let selectedModel const childModelsForModel = compose(flatten, map("children"), get("children")) @@ -29,7 +30,6 @@ ? childModelsForModel($store.hierarchy) : $store.hierarchy.children - let selectedModel $: { if (record) { selectedModel = getExactNodeForKey($store.hierarchy)(record.key) @@ -48,7 +48,6 @@ $: editingRecord = record || - editingRecord || getNewRecord( selectedModel, getCurrentCollectionKey($backendUiStore.selectedRecord) @@ -69,6 +68,8 @@ } +({ console.log(editingRecord, selectedModel) }) +

Create / Edit Record