From 459be2938efae3dfdf55e53042ada740f88b2349 Mon Sep 17 00:00:00 2001 From: Peter Mathis Date: Sat, 30 Nov 2024 16:16:16 -0300 Subject: [PATCH] Fix loading external registered components using a wrapper function --- src/pat/contentbrowser/src/SelectedItems.svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pat/contentbrowser/src/SelectedItems.svelte b/src/pat/contentbrowser/src/SelectedItems.svelte index d7071f564..ab2cdc1aa 100644 --- a/src/pat/contentbrowser/src/SelectedItems.svelte +++ b/src/pat/contentbrowser/src/SelectedItems.svelte @@ -23,7 +23,6 @@ // get selectedItem component from registry const RegisteredSelectedItem = plone_registry.getComponent("pat-contentbrowser.SelectedItem"); - console.log(RegisteredSelectedItem); onMount(async () => { await initializeSelectedItemsStore(); @@ -93,6 +92,10 @@ selectedItemsNode.dispatchEvent(events.change_event()); } + function LoadSelectedItemComponent(node, props) { + const component = new RegisteredSelectedItem.component({target: node, props: props}); + } + $: { $selectedItems; if ($selectedItems.length || !initializing) { @@ -113,7 +116,7 @@ on:click={() => $showContentBrowser = $selectedItems.length ? false : true }> {#if $selectedItems} {#each $selectedItems as selItem, i (selItem.UID)} - +
{/each} {/if} {#if !$selectedItems}