From cf2778cbaac83d34998ad6fcdd39e75d2c191568 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 11 Apr 2024 09:30:57 +0200 Subject: [PATCH] Filter out fields without filtering options --- .../design/settings/controls/FilterEditor/FilterDrawer.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte index 7f1ee8010d..22b8ede31d 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte @@ -46,7 +46,9 @@ $: parseFilters(filters) $: dispatch("change", enrichFilters(rawFilters, matchAny, onEmptyFilter)) - $: enrichedSchemaFields = getFields(schemaFields || [], { allowLinks: true }) + $: enrichedSchemaFields = getFields(schemaFields || [], { + allowLinks: true, + }).filter(f => !!getValidOperatorsForType({ field: f.name, ...f }).length) $: fieldOptions = enrichedSchemaFields.map(field => field.name) || [] $: valueTypeOptions = allowBindings ? ["Value", "Binding"] : ["Value"]