diff --git a/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte b/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte
index 01bd9f43fe..6587451462 100644
--- a/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte
+++ b/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte
@@ -1,187 +1,30 @@
-{$backendUiStore.selectedModel.name}
-
-
-
-
-
-
-
- {#if paginatedData.length === 0}
-
-
- {#each headers as header}
-
-
- {/each}
- No data.
- {#each headers as header}
-
- {/each}
- {/if}
- {#each paginatedData as row}
-
-
- {/each}
-
-
-
- {#each headers as header}
-
- {#if schema[header].type === 'link'}
- {JSON.stringify(row[header])}
- {:else if schema[header].type === 'attachment'}
-
- {/each}
-
+ Edit
+ |
+ {/if}
{#each columns as header}
- {header} | +
+ {#if allowEditing}
+ |
{/each}
No data. | + {/if} {#each columns as header, idx}{#if idx === 0}No data.{/if} @@ -62,9 +79,20 @@ {/if} {#each paginatedData as row} |
---|---|---|
+ |
+ {/if}
{#each columns as header}
- {#if schema[header].type === 'attachment'}
+ {#if schema[header].type === 'link'}
+ selectRelationship(row._id, header)}>
+ {row[header] ? row[header].length : 0} linked row(s)
+
+ {:else if schema[header].type === 'attachment'}
|
@@ -101,7 +129,6 @@
}
thead th {
color: var(--ink);
- text-transform: capitalize;
font-weight: 500;
font-size: 14px;
text-rendering: optimizeLegibility;
@@ -149,4 +176,20 @@
:global(.popovers > div) {
margin-right: var(--spacing-m);
}
+
+ .edit-header {
+ width: 60px;
+ }
+ .edit-header:hover {
+ cursor: default;
+ color: var(--ink);
+ }
+
+ .link {
+ text-decoration: underline;
+ }
+ .link:hover {
+ color: var(--grey-6);
+ cursor: pointer;
+ }
diff --git a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte
index 2710fdfc66..41ddc734b1 100644
--- a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte
+++ b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte
@@ -1,20 +1,6 @@
+
+