diff --git a/plugins/view-resources/src/components/EditDoc.svelte b/plugins/view-resources/src/components/EditDoc.svelte index 0aed4dba5b..469e6472fc 100644 --- a/plugins/view-resources/src/components/EditDoc.svelte +++ b/plugins/view-resources/src/components/EditDoc.svelte @@ -116,7 +116,7 @@ let inplaceAttributes: string[] = [] let ignoreMixins: Set>> = new Set>>() - async function updateKeys (showAllMixins: boolean): Promise { + async function updateKeys (): Promise { const keysMap = new Map(getFiltredKeys(hierarchy, realObjectClass, ignoreKeys).map((p) => [p.attr._id, p])) for (const m of mixins) { const mkeys = getFiltredKeys(hierarchy, m._id, ignoreKeys) @@ -170,12 +170,12 @@ $: editorFooter = getEditorFooter(_class) - $: getEditorOrDefault(realObjectClass, showAllMixins, _id) + $: getEditorOrDefault(realObjectClass, _id) - function getEditorOrDefault (_class: Ref>, showAllMixins: boolean, _id: Ref): void { + async function getEditorOrDefault (_class: Ref>, _id: Ref): Promise { parentClass = hierarchy.getParentClass(_class) + await updateKeys() mainEditor = getEditor(_class) - updateKeys(showAllMixins) } async function getFieldEditor (key: KeyedAttribute): Promise { @@ -267,7 +267,7 @@ allowedCollections = ev.detail.allowedCollections ?? [] collectionArrays = ev.detail.collectionArrays ?? [] getMixins(parentClass, object, showAllMixins) - updateKeys(showAllMixins) + updateKeys() } @@ -323,7 +323,7 @@ updateKeys(showAllMixins)} + on:update={updateKeys} /> {:else if dir === 'column'} updateKeys(showAllMixins)} + on:update={updateKeys} /> {:else}