From ef0b1a102e3c6454cfe5af0683b1a4b2ab316b58 Mon Sep 17 00:00:00 2001 From: michael shanks Date: Thu, 22 Aug 2019 07:57:56 +0100 Subject: [PATCH] bug when saving components --- .../userInterface/CurrentItemPreview.svelte | 8 +++++-- .../src/userInterface/EditComponent.svelte | 1 + .../userInterface/pagesParsing/createProps.js | 22 +++++++++++++------ .../builder/tests/getComponentInfo.spec.js | 4 ++++ 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/packages/builder/src/userInterface/CurrentItemPreview.svelte b/packages/builder/src/userInterface/CurrentItemPreview.svelte index 1317328e83..8f5e773c04 100644 --- a/packages/builder/src/userInterface/CurrentItemPreview.svelte +++ b/packages/builder/src/userInterface/CurrentItemPreview.svelte @@ -13,11 +13,13 @@ import { afterUpdate } from 'svelte'; let component; let stylesheetLinks = ""; let componentHtml = ""; +let props; store.subscribe(s => { const {componentName, libName} = splitName( s.currentComponentInfo.rootComponent.name); + props = s.currentComponentInfo.fullProps; component = s.libraries[libName][componentName]; stylesheetLinks = pipe(s.pages.stylesheets, [ map(s => ``), @@ -28,7 +30,9 @@ store.subscribe(s => { afterUpdate(() => { - componentHtml = document.getElementById("comonent-container-mock").innerHTML + setTimeout(() => { + componentHtml = document.getElementById("comonent-container-mock").innerHTML + }, 1); }); @@ -51,7 +55,7 @@ afterUpdate(() => {
- +