From 759f34626b0d1d92d037c12449696136121a283d Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 26 Apr 2021 19:29:22 +0100 Subject: [PATCH] Update other backend popovers to be modals --- .../DataTable/buttons/CalculateButton.svelte | 29 +++---- .../DataTable/buttons/FilterButton.svelte | 4 +- .../DataTable/buttons/GroupByButton.svelte | 27 +++--- .../FilterModal.svelte} | 84 +++++++------------ .../DataTable/modals/GroupByModal.svelte | 24 ++++++ .../DataTable/popovers/GroupByPopover.svelte | 63 -------------- 6 files changed, 84 insertions(+), 147 deletions(-) rename packages/builder/src/components/backend/DataTable/{popovers/FilterPopover.svelte => modals/FilterModal.svelte} (73%) create mode 100644 packages/builder/src/components/backend/DataTable/modals/GroupByModal.svelte delete mode 100644 packages/builder/src/components/backend/DataTable/popovers/GroupByPopover.svelte diff --git a/packages/builder/src/components/backend/DataTable/buttons/CalculateButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/CalculateButton.svelte index ad3ebf520b..2d05938f41 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/CalculateButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/CalculateButton.svelte @@ -1,20 +1,21 @@ -
- -
- - - + + + + diff --git a/packages/builder/src/components/backend/DataTable/buttons/FilterButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/FilterButton.svelte index 50730abcda..5b345d6df7 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/FilterButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/FilterButton.svelte @@ -1,6 +1,6 @@ -
- -
- - - + + + + diff --git a/packages/builder/src/components/backend/DataTable/popovers/FilterPopover.svelte b/packages/builder/src/components/backend/DataTable/modals/FilterModal.svelte similarity index 73% rename from packages/builder/src/components/backend/DataTable/popovers/FilterPopover.svelte rename to packages/builder/src/components/backend/DataTable/modals/FilterModal.svelte index 72493b557c..51ccc7db70 100644 --- a/packages/builder/src/components/backend/DataTable/popovers/FilterPopover.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/FilterModal.svelte @@ -1,7 +1,16 @@ -
-
Filter
+ {#if view.filters.length}
{#each view.filters as filter, idx} {#if idx === 0} -

Where

+ {:else} + diff --git a/packages/builder/src/components/backend/DataTable/popovers/GroupByPopover.svelte b/packages/builder/src/components/backend/DataTable/popovers/GroupByPopover.svelte deleted file mode 100644 index a841e3b6ae..0000000000 --- a/packages/builder/src/components/backend/DataTable/popovers/GroupByPopover.svelte +++ /dev/null @@ -1,63 +0,0 @@ - - -
-
Group By
-