From 3f587a4756e4b78a3c59f30716cafd2a83317905 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 26 Oct 2020 18:07:08 +0000 Subject: [PATCH] lint :sparkles: --- .../components/backend/DataTable/Table.svelte | 7 +- .../backend/DataTable/cells/cellRenderers.js | 3 +- .../EditRow.svelte} | 46 ------ .../DataTable/popovers/ColumnPopover.svelte | 145 ------------------ 4 files changed, 3 insertions(+), 198 deletions(-) rename packages/builder/src/components/backend/DataTable/{popovers/RowPopover.svelte => modals/EditRow.svelte} (55%) delete mode 100644 packages/builder/src/components/backend/DataTable/popovers/ColumnPopover.svelte diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index acb4c4e6c0..6a747f1f07 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -3,15 +3,12 @@ import { goto, params } from "@sveltech/routify" import Spinner from "components/common/Spinner.svelte" import AgGrid from "@budibase/svelte-ag-grid" - import { - getRenderer, - editRowRenderer, - } from "./cells/cellRenderers" + import { getRenderer, editRowRenderer } from "./cells/cellRenderers" import TableLoadingOverlay from "./TableLoadingOverlay" import TableHeader from "./TableHeader" import "@budibase/svelte-ag-grid/dist/index.css" - export let schema = {} + export let schema = {} export let data = [] export let title export let allowEditing = false diff --git a/packages/builder/src/components/backend/DataTable/cells/cellRenderers.js b/packages/builder/src/components/backend/DataTable/cells/cellRenderers.js index 28a49f3aaf..c22cad0c71 100644 --- a/packages/builder/src/components/backend/DataTable/cells/cellRenderers.js +++ b/packages/builder/src/components/backend/DataTable/cells/cellRenderers.js @@ -1,7 +1,6 @@ import AttachmentList from "./AttachmentCell.svelte" -import EditRowPopover from "../popovers/RowPopover.svelte" +import EditRowPopover from "../modals/EditRow.svelte" import RelationshipDisplay from "./RelationshipCell.svelte" -import LoadingOverlay from "./LoadingOverlay.svelte" const renderers = { attachment: attachmentRenderer, diff --git a/packages/builder/src/components/backend/DataTable/popovers/RowPopover.svelte b/packages/builder/src/components/backend/DataTable/modals/EditRow.svelte similarity index 55% rename from packages/builder/src/components/backend/DataTable/popovers/RowPopover.svelte rename to packages/builder/src/components/backend/DataTable/modals/EditRow.svelte index 55c48c9699..931e1b4adc 100644 --- a/packages/builder/src/components/backend/DataTable/popovers/RowPopover.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/EditRow.svelte @@ -14,12 +14,10 @@ let modal function showModal() { - // dropdown.hide() modal.show() } function showDelete() { - // dropdown.hide() confirmDeleteDialog.show() } @@ -31,18 +29,6 @@
- diff --git a/packages/builder/src/components/backend/DataTable/popovers/ColumnPopover.svelte b/packages/builder/src/components/backend/DataTable/popovers/ColumnPopover.svelte deleted file mode 100644 index f844cdefae..0000000000 --- a/packages/builder/src/components/backend/DataTable/popovers/ColumnPopover.svelte +++ /dev/null @@ -1,145 +0,0 @@ - - -
- {field.name} - -
- - {#if editing} -
Edit Column
- - {:else} -
    - {#if type !== 'link'} -
  • - - Edit -
  • - {/if} -
  • - - Delete -
  • - {#if sortDirection === 'desc' || sortDirection === 'asc'} -
  • sort('none', field.name)}> - - Remove sort -
  • - {/if} - {#if sortDirection === 'desc' || sortColumn !== field.name} -
  • sort('asc', field.name)}> - - Sort A - Z -
  • - {/if} - {#if sortDirection === 'asc' || sortColumn !== field.name} -
  • sort('desc', field.name)}> - - Sort Z - A -
  • - {/if} -
- {/if} -
- - -