From 350e0233e201e2441b8e4face337f13e3338640b Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Sat, 6 Aug 2022 20:52:34 +0100 Subject: [PATCH] Handle 'Is in' onOperatorChange --- .../settings/controls/FilterEditor/FilterDrawer.svelte | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 4eab5d4f4b..004e3f0f0d 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte @@ -87,6 +87,16 @@ if (expression.noValue) { expression.value = null } + if ( + operator === Constants.OperatorOptions.In.value && + !Array.isArray(expression.value) + ) { + if (expression.value) { + expression.value = [expression.value] + } else { + expression.value = [] + } + } } const getFieldOptions = field => {