Show component hidden by conditional UI if they would otherwise hide the selected component

This commit is contained in:
Andrew Kingston 2021-08-23 14:01:57 +01:00
parent 4a67de926a
commit 796dc24b06
1 changed files with 2 additions and 2 deletions

View File

@ -63,6 +63,7 @@
$: selected =
$builderStore.inBuilder &&
$builderStore.selectedComponentId === instance._id
$: inSelectedPath = $builderStore.selectedComponentPath?.includes(id)
$: interactive = $builderStore.previewType === "layout" || insideScreenslot
$: evaluateConditions(enrichedSettings?._conditions)
$: componentSettings = { ...enrichedSettings, ...conditionalSettings }
@ -174,13 +175,12 @@
</script>
{#key propsHash}
{#if constructor && componentSettings && visible}
{#if constructor && componentSettings && (visible || inSelectedPath)}
<div
class={`component ${id}`}
data-type={interactive ? "component" : ""}
data-id={id}
data-name={name}
class:hidden={!visible}
>
<svelte:component this={constructor} {...componentSettings}>
{#if children.length}