Fully remount component settings when changing selected component

This commit is contained in:
Andrew Kingston 2022-07-27 10:10:42 +01:00
parent e4b8933067
commit 0ed3775a6d
1 changed files with 22 additions and 16 deletions

View File

@ -27,20 +27,26 @@
</script>
{#if $selectedComponent}
<Panel {title} icon={componentDefinition.icon} borderLeft>
<ComponentSettingsSection
{componentInstance}
{componentDefinition}
{bindings}
{componentBindings}
{isScreen}
/>
<DesignSection {componentInstance} {componentDefinition} {bindings} />
<CustomStylesSection {componentInstance} {componentDefinition} {bindings} />
<ConditionalUISection
{componentInstance}
{componentDefinition}
{bindings}
/>
</Panel>
{#key $selectedComponent._id}
<Panel {title} icon={componentDefinition.icon} borderLeft>
<ComponentSettingsSection
{componentInstance}
{componentDefinition}
{bindings}
{componentBindings}
{isScreen}
/>
<DesignSection {componentInstance} {componentDefinition} {bindings} />
<CustomStylesSection
{componentInstance}
{componentDefinition}
{bindings}
/>
<ConditionalUISection
{componentInstance}
{componentDefinition}
{bindings}
/>
</Panel>
{/key}
{/if}