diff --git a/packages/client/src/components/app/dynamic-filter/FilterModal.svelte b/packages/client/src/components/app/dynamic-filter/FilterModal.svelte index 447bdc1058..54ad1f3a80 100644 --- a/packages/client/src/components/app/dynamic-filter/FilterModal.svelte +++ b/packages/client/src/components/app/dynamic-filter/FilterModal.svelte @@ -4,7 +4,6 @@ Button, Combobox, DatePicker, - DrawerContent, Icon, Input, Layout, @@ -12,10 +11,12 @@ } from "@budibase/bbui" import { generate } from "shortid" import { LuceneUtils, Constants } from "@budibase/frontend-core" + import { getContext } from "svelte" export let schemaFields export let filters = [] + const context = getContext("context") const BannedTypes = ["link", "attachment", "json"] $: fieldOptions = (schemaFields ?? []) @@ -89,55 +90,55 @@ } - -
- - - {#if !filters?.length} - Add your first filter expression. - {:else} - Results are filtered to only those which match all of the following - constraints. - {/if} - - {#if filters?.length} -
- {#each filters as filter, idx} - onFieldChange(filter, e.detail)} + placeholder="Column" + /> + + {:else if ["options", "array"].includes(filter.type)} + - - {:else if ["options", "array"].includes(filter.type)} - - {:else if filter.type === "boolean"} - - {:else if filter.type === "datetime"} - - {:else} - - {/if} + {:else if filter.type === "datetime"} + + {:else} + + {/if} +
removeFilter(filter.id)} /> - {/each} -
- {/if} -
- +
+ {/each}
-
-
-
+ {/if} +
+ +
+ +