From e75df5afd32722fded003bea77dc4a0b1b4edc2a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 7 Apr 2022 15:39:14 +0100 Subject: [PATCH] Update auto column, export and filter buttons to new designs and to support disabled state --- .../components/backend/DataTable/DataTable.svelte | 12 +++++++++--- .../backend/DataTable/buttons/ExportButton.svelte | 9 ++++++++- .../DataTable/buttons/HideAutocolumnButton.svelte | 10 ++++++++-- .../DataTable/buttons/TableFilterButton.svelte | 2 ++ 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index fd2045fc07..6a6b16b6fd 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -150,14 +150,20 @@ /> {/if} - - + {#key id} - + {/key} diff --git a/packages/builder/src/components/backend/DataTable/buttons/ExportButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/ExportButton.svelte index d8502c7d3e..093ca33182 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/ExportButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/ExportButton.svelte @@ -3,11 +3,18 @@ import ExportModal from "../modals/ExportModal.svelte" export let view + export let disabled = false let modal - + Export diff --git a/packages/builder/src/components/backend/DataTable/buttons/HideAutocolumnButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/HideAutocolumnButton.svelte index 3d74188ee4..e9b042a653 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/HideAutocolumnButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/HideAutocolumnButton.svelte @@ -8,6 +8,12 @@ } - - {#if hideAutocolumns}Show auto columns{:else}Hide auto columns{/if} + + Auto columns diff --git a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte index c07b11237b..cf9e4b1358 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte @@ -5,6 +5,7 @@ export let schema export let filters + export let disabled = false const dispatch = createEventDispatcher() let modal @@ -17,6 +18,7 @@ icon="Filter" size="S" quiet + {disabled} on:click={modal.show} active={tempValue?.length > 0} >