From d74cdf8261dfe6dd7453dfaac289ef8ec11ff7bb Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 25 Sep 2020 09:17:58 +0100 Subject: [PATCH] Tidy backend table styles, fix layout and add scrolling --- .../database/DataTable/ModelDataTable.svelte | 66 +++++++++---------- .../database/DataTable/Table.svelte | 32 ++++----- .../[application]/backend/_layout.svelte | 3 +- 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte b/packages/builder/src/components/database/DataTable/ModelDataTable.svelte index 20f7a61c6b..37885c0512 100644 --- a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte +++ b/packages/builder/src/components/database/DataTable/ModelDataTable.svelte @@ -54,15 +54,13 @@
-
-

{$backendUiStore.selectedModel.name}

-
- - {#if Object.keys($backendUiStore.selectedModel.schema).length > 0} - - - {/if} -
+

{$backendUiStore.selectedModel.name}

+
+ + {#if Object.keys($backendUiStore.selectedModel.schema).length > 0} + + + {/if}
@@ -80,7 +78,10 @@ {#if paginatedData.length === 0} -
No Data.
+ + {#each headers as header} + @@ -108,30 +109,31 @@ diff --git a/packages/builder/src/components/database/DataTable/Table.svelte b/packages/builder/src/components/database/DataTable/Table.svelte index 4d6563d8bd..5cc778dc2e 100644 --- a/packages/builder/src/components/database/DataTable/Table.svelte +++ b/packages/builder/src/components/database/DataTable/Table.svelte @@ -54,7 +54,11 @@ {#if paginatedData.length === 0} -
No Data.
+ {#each columns as header, idx} + + {/each} {/if} {#each paginatedData as row} @@ -77,29 +81,24 @@ diff --git a/packages/builder/src/pages/[application]/backend/_layout.svelte b/packages/builder/src/pages/[application]/backend/_layout.svelte index 7dd3cb809e..8dae59d113 100644 --- a/packages/builder/src/pages/[application]/backend/_layout.svelte +++ b/packages/builder/src/pages/[application]/backend/_layout.svelte @@ -25,7 +25,8 @@ } .content { flex: 1 1 auto; - margin: var(--spacing-xl) 40px; + padding: var(--spacing-xl) 40px; + overflow-y: auto; } .nav { overflow-y: auto;
No data. + {/each} {/if} {#each paginatedData as row}
+ {#if idx === 0}No data.{/if} +