diff --git a/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte b/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte
index 6565bf1766..49659ff8d0 100644
--- a/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte
+++ b/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte
@@ -3,6 +3,7 @@
import CreateRowButton from "./buttons/CreateRowButton.svelte"
import CreateColumnButton from "./buttons/CreateColumnButton.svelte"
import CreateViewButton from "./buttons/CreateViewButton.svelte"
+ import ExportButton from "./buttons/ExportButton.svelte"
import * as api from "./api"
import Table from "./Table.svelte"
@@ -10,6 +11,10 @@
$: title = $backendUiStore.selectedModel.name
$: schema = $backendUiStore.selectedModel.schema
+ $: modelView = {
+ schema,
+ name: $backendUiStore.selectedView.name,
+ }
// Fetch records for specified model
$: {
@@ -26,5 +31,6 @@
{#if Object.keys(schema).length > 0}
+
{/if}
diff --git a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte
index 4c7e6bb915..ec94ae2aa6 100644
--- a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte
+++ b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte
@@ -4,6 +4,7 @@
import CalculateButton from "./buttons/CalculateButton.svelte"
import GroupByButton from "./buttons/GroupByButton.svelte"
import FilterButton from "./buttons/FilterButton.svelte"
+ import ExportButton from "./buttons/ExportButton.svelte"
export let view = {}
@@ -39,4 +40,5 @@
{#if view.calculation}
{/if}
+
diff --git a/packages/builder/src/components/backend/DataTable/buttons/ExportButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/ExportButton.svelte
new file mode 100644
index 0000000000..f4e4fb34a8
--- /dev/null
+++ b/packages/builder/src/components/backend/DataTable/buttons/ExportButton.svelte
@@ -0,0 +1,20 @@
+
+
+
+
+
+ Export
+
+
+
+
+
diff --git a/packages/builder/src/components/backend/DataTable/popovers/ExportPopover.svelte b/packages/builder/src/components/backend/DataTable/popovers/ExportPopover.svelte
new file mode 100644
index 0000000000..0d52689a6e
--- /dev/null
+++ b/packages/builder/src/components/backend/DataTable/popovers/ExportPopover.svelte
@@ -0,0 +1,61 @@
+
+
+
+
Export Data
+
+
+
+
+
diff --git a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte b/packages/builder/src/components/database/DataTable/ModelDataTable.svelte
deleted file mode 100644
index c0d5ad6959..0000000000
--- a/packages/builder/src/components/database/DataTable/ModelDataTable.svelte
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
{$backendUiStore.selectedModel.name}
-
-
- {#if Object.keys($backendUiStore.selectedModel.schema).length > 0}
-
-
-
- {/if}
-
-
-
-
-
-
- {#each headers as header}
-
-
- |
- {/each}
-
-
-
- {#if paginatedData.length === 0}
- No Data.
- {/if}
- {#each paginatedData as row}
-
-
-
- |
- {#each headers as header}
-
- {#if schema[header].type === 'link'}
-
- {:else if schema[header].type === 'attachment'}
-
- {:else}{getOr('', header, row)}{/if}
- |
- {/each}
-
- {/each}
-
-
-
-
-
-
diff --git a/packages/builder/src/components/database/DataTable/ViewDataTable.svelte b/packages/builder/src/components/database/DataTable/ViewDataTable.svelte
deleted file mode 100644
index 0958737b59..0000000000
--- a/packages/builder/src/components/database/DataTable/ViewDataTable.svelte
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
- {#if view.calculation}
-
- {/if}
-
-
diff --git a/packages/builder/src/components/database/DataTable/popovers/Export.svelte b/packages/builder/src/components/database/DataTable/popovers/Export.svelte
deleted file mode 100644
index 00514edb9c..0000000000
--- a/packages/builder/src/components/database/DataTable/popovers/Export.svelte
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
- Export
-
-
-
- Export Format
-
-
-
-
-
-
-
-