1
0
Fork 0
mirror of synced 2024-09-30 09:07:25 +13:00

adds a empty state for no components added in the repeater

This commit is contained in:
kevmodrome 2021-01-19 15:21:23 +01:00
parent 479ea07e92
commit 6a1383b13b
No known key found for this signature in database
GPG key ID: 828D8FE4D235B551
2 changed files with 6 additions and 2 deletions

View file

@ -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 => {

View file

@ -28,7 +28,11 @@
{#if rows.length > 0}
{#each rows as row}
<DataProvider {row}>
<slot />
{#if $component.children === 0}
<p>Add some components to.</p>
{:else}
<slot />
{/if}
</DataProvider>
{/each}
{:else}