diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index 23ba364dfb..7361573efd 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -29,7 +29,7 @@ $builderStore.previewType === "layout" || screenslotContext // Update component context - $: componentStore.set({ id, styles: { ...styles, id, allowSelection } }) + $: componentStore.set({ id, children: children.length, styles: { ...styles, id, allowSelection } }) // Gets the component constructor for the specified component const getComponentConstructor = component => { diff --git a/packages/standard-components/src/List.svelte b/packages/standard-components/src/List.svelte index 1a5638404a..809abf2972 100644 --- a/packages/standard-components/src/List.svelte +++ b/packages/standard-components/src/List.svelte @@ -24,9 +24,27 @@
- {#each rows as row} - - - - {/each} + {#if rows.length > 0} + {#each rows as row} + + {#if $component.children === 0} +

Add some components too.

+ {:else} + + {/if} +
+ {/each} + {:else} +

Feed me some data

+ {/if}
+ + \ No newline at end of file