diff --git a/packages/frontend-core/src/components/FilterBuilder.svelte b/packages/frontend-core/src/components/FilterBuilder.svelte
index c0bc328a4e..5b6b6b4c86 100644
--- a/packages/frontend-core/src/components/FilterBuilder.svelte
+++ b/packages/frontend-core/src/components/FilterBuilder.svelte
@@ -11,7 +11,7 @@
Label,
Multiselect,
} from "@budibase/bbui"
- import { FieldType, SearchFilterOperator } from "@budibase/types"
+ import { ArrayOperator, FieldType } from "@budibase/types"
import { generate } from "shortid"
import { QueryUtils, Constants } from "@budibase/frontend-core"
import { getContext } from "svelte"
@@ -268,7 +268,7 @@
{:else if [FieldType.STRING, FieldType.LONGFORM, FieldType.NUMBER, FieldType.BIGINT, FieldType.FORMULA].includes(filter.type)}
- {:else if filter.type === FieldType.ARRAY || (filter.type === FieldType.OPTIONS && filter.operator === SearchFilterOperator.ONE_OF)}
+ {:else if filter.type === FieldType.ARRAY || (filter.type === FieldType.OPTIONS && filter.operator === ArrayOperator.ONE_OF)}
x.trim())
- } else {
- field[key] = [field[key]]
- }
+ if (Array.isArray(field[key])) {
+ continue
+ }
+
+ const value = field[key] as any
+ if (typeof value === "string") {
+ field[key] = value.split(",").map((x: string) => x.trim())
+ } else {
+ field[key] = [value]
}
}
}