From c619b8f39e929e3135f7f8c9246d53d2aa638788 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 24 Mar 2021 18:46:12 +0000 Subject: [PATCH] Make table responsive and vertically and horizontally scrollable --- .../src/table/Table.svelte | 100 +++++++++++------- 1 file changed, 62 insertions(+), 38 deletions(-) diff --git a/packages/standard-components/src/table/Table.svelte b/packages/standard-components/src/table/Table.svelte index 930b5a343a..8df8c06e34 100644 --- a/packages/standard-components/src/table/Table.svelte +++ b/packages/standard-components/src/table/Table.svelte @@ -8,6 +8,7 @@ export let dataProvider export let columns export let showAutoColumns + export let rowCount = 8 const component = getContext("component") const { styleable } = getContext("sdk") @@ -60,51 +61,71 @@ } -
- - - - {#each fields as field} - - {/each} - - - - {#each sortedRows as row} - +
+
+
sortBy(field)}> -
- {schema[field]?.name} - -
-
+ + {#each fields as field} - {/each} - {/each} - -
-
- +
sortBy(field)}> +
+ {schema[field]?.name} +
- +
+ + + {#each sortedRows as row} + + {#each fields as field} + +
+ +
+ + {/each} + + {/each} + + +