{#if $isCollectionsLoading && !$collections.length}

Loading collections...

{:else if !$collections.length}
{#if $hideControls}

You don't have any collections yet.

{:else}

Create your first collection to add records!

{/if}
{:else} (filter = e.detail)} />
{ updateQueryParams({ recordId: e.detail.id, }); let showModel = e.detail._partial ? e.detail.id : e.detail; $activeCollection.type === "view" ? recordPreviewPanel?.show(showModel) : recordUpsertPanel?.show(showModel); }} on:delete={() => { recordsCount?.reload(); }} on:new={() => recordUpsertPanel?.show()} /> {/if} { updateQueryParams({ recordId: null }); }} on:save={(e) => { if (filter) { // if there is applied filter, reload the count since we // don't know after the save whether the record satisfies it recordsCount?.reload(); } else if (e.detail.isNew) { totalCount++; } recordsList?.reloadLoadedPages(); }} on:delete={(e) => { if (!filter || recordsList?.hasRecord(e.detail.id)) { totalCount--; } recordsList?.reloadLoadedPages(); }} /> { updateQueryParams({ recordId: null }); }} />