fixing record saving bug
This commit is contained in:
parent
4729c6ebfe
commit
544306ecda
|
@ -18,6 +18,7 @@
|
||||||
export let onClosed
|
export let onClosed
|
||||||
|
|
||||||
let errors = []
|
let errors = []
|
||||||
|
let selectedModel
|
||||||
|
|
||||||
const childModelsForModel = compose(flatten, map("children"), get("children"))
|
const childModelsForModel = compose(flatten, map("children"), get("children"))
|
||||||
|
|
||||||
|
@ -29,7 +30,6 @@
|
||||||
? childModelsForModel($store.hierarchy)
|
? childModelsForModel($store.hierarchy)
|
||||||
: $store.hierarchy.children
|
: $store.hierarchy.children
|
||||||
|
|
||||||
let selectedModel
|
|
||||||
$: {
|
$: {
|
||||||
if (record) {
|
if (record) {
|
||||||
selectedModel = getExactNodeForKey($store.hierarchy)(record.key)
|
selectedModel = getExactNodeForKey($store.hierarchy)(record.key)
|
||||||
|
@ -48,7 +48,6 @@
|
||||||
|
|
||||||
$: editingRecord =
|
$: editingRecord =
|
||||||
record ||
|
record ||
|
||||||
editingRecord ||
|
|
||||||
getNewRecord(
|
getNewRecord(
|
||||||
selectedModel,
|
selectedModel,
|
||||||
getCurrentCollectionKey($backendUiStore.selectedRecord)
|
getCurrentCollectionKey($backendUiStore.selectedRecord)
|
||||||
|
@ -69,6 +68,8 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
({ console.log(editingRecord, selectedModel) })
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4 class="budibase__title--4">Create / Edit Record</h4>
|
<h4 class="budibase__title--4">Create / Edit Record</h4>
|
||||||
<ErrorsBox {errors} />
|
<ErrorsBox {errors} />
|
||||||
|
|
Loading…
Reference in New Issue