From 43eac9973073226950efac2f854da14cc0926e57 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 29 Sep 2021 09:18:08 +0100 Subject: [PATCH] Prevent bindings from being used when filtering tables in the data UI --- .../backend/DataTable/buttons/TableFilterButton.svelte | 6 +++++- .../PropertyControls/FilterEditor/FilterDrawer.svelte | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte index 7c96a73ab6..c07b11237b 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte @@ -30,7 +30,11 @@ onConfirm={() => dispatch("change", tempValue)} >
- +
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte index eddfd9b997..65fb542003 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte @@ -19,12 +19,14 @@ export let filters = [] export let bindings = [] export let panel = BindingPanel + export let allowBindings = true const BannedTypes = ["link", "attachment", "formula"] $: fieldOptions = (schemaFields ?? []) .filter(field => !BannedTypes.includes(field.type)) .map(field => field.name) + $: valueTypeOptions = allowBindings ? ["Value", "Binding"] : ["Value"] const addFilter = () => { filters = [ @@ -117,7 +119,7 @@ />