From 35aef8966114f0cedd63d87ae5ea2151d027671f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 26 Jan 2022 17:49:02 +0000 Subject: [PATCH] Fixing dynamic filter modal in client library to include static formula. --- .../components/app/dynamic-filter/FilterModal.svelte | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/app/dynamic-filter/FilterModal.svelte b/packages/client/src/components/app/dynamic-filter/FilterModal.svelte index f303c69aaf..16d5bb0ee5 100644 --- a/packages/client/src/components/app/dynamic-filter/FilterModal.svelte +++ b/packages/client/src/components/app/dynamic-filter/FilterModal.svelte @@ -19,10 +19,14 @@ export let schemaFields export let filters = [] - const BannedTypes = ["link", "attachment", "formula", "json"] + const BannedTypes = ["link", "attachment", "json"] $: fieldOptions = (schemaFields ?? []) - .filter(field => !BannedTypes.includes(field.type)) + .filter( + field => + !BannedTypes.includes(field.type) || + (field.type === "formula" && field.formulaType === "static") + ) .map(field => field.name) const addFilter = () => { @@ -114,7 +118,7 @@ on:change={e => onOperatorChange(filter, e.detail)} placeholder={null} /> - {#if ["string", "longform", "number"].includes(filter.type)} + {#if ["string", "longform", "number", "formula"].includes(filter.type)} {:else if ["options", "array"].includes(filter.type)}