diff --git a/packages/builder/src/components/backend/DataTable/RelationshipDataTable.svelte b/packages/builder/src/components/backend/DataTable/RelationshipDataTable.svelte new file mode 100644 index 0000000000..7a1ebbed78 --- /dev/null +++ b/packages/builder/src/components/backend/DataTable/RelationshipDataTable.svelte @@ -0,0 +1,32 @@ + + +{#if record && record._id === recordId} +
- Edit
- |
- {/if}
- {#each columns as header}
-
- {#if allowEditing}
- |
- {/each}
- ||
---|---|---|---|
+ Edit
+ |
+ {/if}
+ {#each columns as header}
+
+ {#if allowEditing}
+ {header}
+ {/if}
+ |
+ {/each}
+ No data. | + {/if} + {#each columns as header, idx} ++ {#if idx === 0}No data.{/if} + | + {/each} + {/if} + {#each paginatedData as row} +
No data. | +
+ |
{/if}
- {#each columns as header, idx}
- - {#if idx === 0}No data.{/if} + {#each columns as header} + |
+ {#if schema[header].type === 'link'}
+ selectRelationship(row, header)}>
+ {row[header] ? row[header].length : 0} linked row(s)
+
+ {:else if schema[header].type === 'attachment'}
+ |
{/each}
- {/if}
- {#each paginatedData as row}
-
- |
- {/if}
- {#each columns as header}
-
- {#if schema[header].type === 'link'}
- selectRelationship(row._id, header)}>
- {row[header] ? row[header].length : 0} linked row(s)
-
- {:else if schema[header].type === 'attachment'}
- |
- {/each}
-