1
0
Fork 0
mirror of synced 2024-07-03 05:20:32 +12:00

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

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}