diff --git a/packages/builder/src/components/common/LinkedRowSelector.svelte b/packages/builder/src/components/common/LinkedRowSelector.svelte
index a9a05cf12b..5cacd7c236 100644
--- a/packages/builder/src/components/common/LinkedRowSelector.svelte
+++ b/packages/builder/src/components/common/LinkedRowSelector.svelte
@@ -8,6 +8,8 @@
export let schema
export let linkedRows = []
+ console.log(schema)
+ console.log(linkedRows)
let rows = []
$: label = capitalise(schema.name)
@@ -31,6 +33,12 @@
function getPrettyName(row) {
return row[linkedTable.primaryDisplay || "_id"]
}
+
+ let oneToManyRow = getPrettyName(linkedRows[0]) || ''
+
+ function oneToManyValueSetter(value) {
+ linkedRows = [value]
+ }
{#if linkedTable.primaryDisplay == null}
@@ -41,13 +49,22 @@
table.
{:else}
-
- {#each rows as row}
-
- {/each}
-
+ {#if schema.oneToMany}
+
+ {:else}
+
+ {#each rows as row}
+
+ {/each}
+
+ {/if}
{/if}