From c8c5cbe16ccbac9123009c656a8bbc4ed3cedada Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 23 Oct 2024 16:24:02 +0100 Subject: [PATCH] Update more usages of processing search filters --- .../SetupPanel/AutomationBlockSetup.svelte | 4 +++- .../DataTable/buttons/TableFilterButton.svelte | 13 ++----------- packages/builder/src/stores/builder/components.js | 1 - .../src/components/CoreFilterBuilder.svelte | 14 ++++++++++++-- .../components/grid/stores/datasources/viewV2.js | 1 + 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index cbac1bf2ff..b422154290 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -798,7 +798,9 @@ break } } - return utils.processSearchFilters(filters) + return Array.isArray(filters) + ? utils.processSearchFilters(filters) + : filters } function saveFilters(key) { diff --git a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte index 74b7d06ea5..ca4c76c968 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte @@ -5,7 +5,6 @@ import { getUserBindings } from "dataBinding" import { makePropSafe } from "@budibase/string-templates" import { search } from "@budibase/frontend-core" - import { utils } from "@budibase/shared-core" import { tables } from "stores/builder" export let schema @@ -17,7 +16,7 @@ let drawer - $: localFilters = utils.processSearchFilters(filters) + $: localFilters = filters $: schemaFields = search.getFields( $tables.list, Object.values(schema || {}), @@ -53,15 +52,7 @@ {filterCount ? `Filter: ${filterCount}` : "Filter"} - { - localFilters = utils.processSearchFilters(filters) - }} - forceModal -> +