+ {#if collection.viewKey === 'list'}
+
+ {:else if viewType === 'form'}
+
+ {#each newItems as item, index}
+ deleteRow(index)}
+ >
+
+
+ {/each}
+
+ {:else if viewType === 'table'}
+
+ inputTypes.includes(c.inputType))
+ .map(c => ({ ...c, id: randomString(8), title: c.key })) || []
+ }
+ showHeaders={true}
+ canSelect={false}
+ canRemoveItems={true}
+ hideChildrenToggles={true}
+ on:addRow={addRow}
+ bind:inputsValid={allValid}
+ />
+
+ {/if}
+
+ {#if collection.viewKey !== 'list'}
+
+ {/if}
{#if insertedIds}
Success! {insertedIds.length} document{insertedIds.length > 1 ? 's' : ''} inserted
{/if}
@@ -123,7 +157,7 @@
-
@@ -135,11 +169,14 @@