diff --git a/packages/builder/src/components/database/DataTable/ViewDataTable.svelte b/packages/builder/src/components/database/DataTable/ViewDataTable.svelte
index 838512a872..64088da551 100644
--- a/packages/builder/src/components/database/DataTable/ViewDataTable.svelte
+++ b/packages/builder/src/components/database/DataTable/ViewDataTable.svelte
@@ -17,6 +17,7 @@
import EditRowPopover from "./popovers/EditRow.svelte"
import CalculationPopover from "./popovers/Calculate.svelte"
import GroupByPopover from "./popovers/GroupBy.svelte"
+ import FilterPopover from "./popovers/Filter.svelte"
let COLUMNS = [
{
@@ -54,8 +55,8 @@
let data = []
- $: ({ name, groupBy } = view)
- $: !name.startsWith("all_") && fetchViewData(name, groupBy)
+ $: ({ name, groupBy, filters } = view)
+ $: !name.startsWith("all_") && filters && fetchViewData(name, groupBy)
async function fetchViewData(name, groupBy) {
let QUERY_VIEW_URL = `/api/views/${name}?stats=true`
@@ -69,6 +70,7 @@
diff --git a/packages/builder/src/components/database/DataTable/modals/CreateEditRecord.svelte b/packages/builder/src/components/database/DataTable/modals/CreateEditRecord.svelte
index 3eb7a4a149..b215a0583a 100644
--- a/packages/builder/src/components/database/DataTable/modals/CreateEditRecord.svelte
+++ b/packages/builder/src/components/database/DataTable/modals/CreateEditRecord.svelte
@@ -19,25 +19,6 @@
? Object.entries($backendUiStore.selectedModel.schema)
: []
- const isSelect = meta =>
- meta.type === "string" &&
- meta.constraints &&
- meta.constraints.inclusion &&
- meta.constraints.inclusion.length > 0
-
- function determineInputType(meta) {
- if (meta.type === "datetime") return "date"
- if (meta.type === "number") return "number"
- if (meta.type === "boolean") return "checkbox"
- if (isSelect(meta)) return "select"
-
- return "text"
- }
-
- function determineOptions(meta) {
- return isSelect(meta) ? meta.constraints.inclusion : []
- }
-
async function saveRecord() {
const recordResponse = await api.saveRecord(
{
@@ -73,11 +54,7 @@
linkName={meta.name}
modelId={meta.modelId} />
{:else}
-
+
{/if}
{/each}
diff --git a/packages/builder/src/components/database/DataTable/modals/RecordFieldControl.svelte b/packages/builder/src/components/database/DataTable/modals/RecordFieldControl.svelte
index 638625a830..8c3a6b858e 100644
--- a/packages/builder/src/components/database/DataTable/modals/RecordFieldControl.svelte
+++ b/packages/builder/src/components/database/DataTable/modals/RecordFieldControl.svelte
@@ -1,10 +1,32 @@
{#if type === 'select'}
-