{#if collection.viewKey === 'list'}
{:else if viewType === 'form'}
{:else if viewType === 'table'}
inputTypes.includes(c.inputType)) .map(c => ({ ...c, id: randomString(8), title: c.key })) || [] } showHeaders={true} canAddRows={true} canSelect={false} canRemoveItems={true} hideChildrenToggles={true} on:addRow={addRow} bind:inputsValid={formValid} />
{/if}
{#if insertedIds}
Success! {insertedIds.length} document{insertedIds.length > 1 ? 's' : ''} inserted
{/if}
{#if insertedIds}
View inserted docs
{/if} {#if collection.viewKey !== 'list'}
{/if}
{#each Object.entries(viewsForCollection) as [key, view]}
{key === 'list' ? 'Raw JSON' : view.name}
{/each}
dispatch('openViewConfig')} title="Configure view">
Insert