1
0
Fork 0
mirror of synced 2024-07-04 22:11:23 +12:00

Simplify client app component re-render keying

This commit is contained in:
Andrew Kingston 2021-09-20 15:41:20 +01:00
parent 392a1f05ee
commit cae514ca06

View file

@ -65,6 +65,7 @@
$: inSelectedPath = $builderStore.selectedComponentPath?.includes(id)
$: evaluateConditions(enrichedSettings?._conditions)
$: componentSettings = { ...enrichedSettings, ...conditionalSettings }
$: renderKey = `${propsHash}-${emptyState}`
// Update component context
$: componentStore.set({
@ -176,8 +177,7 @@
$: droppable = interactive && !isLayout && !isScreen
</script>
{#key propsHash}
{#key empty}
{#key renderKey}
{#if constructor && componentSettings && (visible || inSelectedPath)}
<!-- The ID is used as a class because getElementsByClassName is O(1) -->
<!-- and the performance matters for the selection indicators -->
@ -201,7 +201,6 @@
</svelte:component>
</div>
{/if}
{/key}
{/key}
<style>