From b2c045c0cadbeadb9f0ac0fc7c5c8a69e0050521 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Fri, 21 Feb 2020 22:56:18 +0000 Subject: [PATCH] standalone templates --- .../src/userInterface/ComponentSelectionList.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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}
    @@ -141,7 +141,7 @@ {splitName(component.name).componentName} Presets {#each Object.keys(component.presets) as preset}
  • onComponentChosen(component.name, preset)}> + on:click|stopPropagation={() => onComponentChosen(component, preset)}> {preset}
  • {/each}