bugfix: child key not constructed correctly

This commit is contained in:
Michael Shanks 2020-03-26 14:52:44 +00:00
parent 8e322e314b
commit 721569c2d4
1 changed files with 6 additions and 4 deletions

View File

@ -31,12 +31,14 @@
? selectedModel.fields.map(({ name }) => name) ? selectedModel.fields.map(({ name }) => name)
: [] : []
$: currentCollectionKey =
$store.selectedRecord function getCurrentCollectionKey(selectedRecord) {
? joinKey($store.selectedRecord.key, selectedModel.collectionName) return selectedRecord
? joinKey(selectedRecord.key, selectedModel.collectionName)
: joinKey(selectedModel.collectionName) : joinKey(selectedModel.collectionName)
}
$: editingRecord = editingRecord || record || getNewRecord(selectedModel, currentCollectionKey) $: editingRecord = editingRecord || record || getNewRecord(selectedModel, getCurrentCollectionKey($backendUiStore.selectedRecord))
function closed() { function closed() {
editingRecord = null editingRecord = null