From 947dd5d05f2e96d12af7099cc12e4ed39c3df523 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 29 Jun 2020 17:20:35 +0100 Subject: [PATCH] bugfix: design category closes as another opens --- .../builder/src/components/userInterface/DesignView.svelte | 6 +++++- .../src/components/userInterface/PropertyGroup.svelte | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/userInterface/DesignView.svelte b/packages/builder/src/components/userInterface/DesignView.svelte index 5cc65ec214..408dc54d06 100644 --- a/packages/builder/src/components/userInterface/DesignView.svelte +++ b/packages/builder/src/components/userInterface/DesignView.svelte @@ -11,6 +11,7 @@ let selectedCategory = "normal" let propGroup = null + let currentGroup const getProperties = name => panelDefinition[name] @@ -33,6 +34,7 @@ ] $: propertyGroupNames = Object.keys(panelDefinition) +
@@ -51,7 +53,9 @@ styleCategory={selectedCategory} {onStyleChanged} {componentDefinition} - {componentInstance} /> + {componentInstance} + open={currentGroup === groupName} + on:open={() => currentGroup = groupName} /> {/each} {:else}
diff --git a/packages/builder/src/components/userInterface/PropertyGroup.svelte b/packages/builder/src/components/userInterface/PropertyGroup.svelte index b181b406a7..511807b2e6 100644 --- a/packages/builder/src/components/userInterface/PropertyGroup.svelte +++ b/packages/builder/src/components/userInterface/PropertyGroup.svelte @@ -8,11 +8,12 @@ export let properties = [] export let componentInstance = {} export let onStyleChanged = () => {} + export let open = false $: style = componentInstance["_styles"][styleCategory] || {} - + {#each properties as props}