diff --git a/packages/builder/src/userInterface/ComponentSelectionList.svelte b/packages/builder/src/userInterface/ComponentSelectionList.svelte index 10c4e7b37e..2c0290ad29 100644 --- a/packages/builder/src/userInterface/ComponentSelectionList.svelte +++ b/packages/builder/src/userInterface/ComponentSelectionList.svelte @@ -23,7 +23,7 @@ values, flatten, filter(t => !$store.components.some(c => c.name === t.component)), - map(t => ({ name: splitName(t.component), template: t })), + map(t => ({ name: splitName(t.component).componentName, template: t })), uniqBy(t => t.name) ]) @@ -47,7 +47,7 @@ if (component.template) { onTemplateChosen(component.template) } else { - store.addChildComponent(component) + store.addChildComponent(component.name) } } @@ -133,7 +133,7 @@
onComponentChosen(component.name)}> + on:click={() => onComponentChosen(component)}>
{splitName(component.name).componentName}
{#if (component.presets || templatesByComponent[component.name]) && component.name === selectedComponent}