Browse Source
Merge pull request #7303 from Budibase/bug/sev2/isin-conditionalui
Only allow bindings for 'Is In' operator in conditional UI
master
melohagan
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ConditionalUIDrawer.svelte
-
packages/frontend-core/src/utils/lucene.js
|
|
|
@ -112,7 +112,7 @@ |
|
|
|
Constants.OperatorOptions.NotEmpty.value, |
|
|
|
] |
|
|
|
condition.noValue = noValueOptions.includes(newOperator) |
|
|
|
if (condition.noValue) { |
|
|
|
if (condition.noValue || newOperator === "oneOf") { |
|
|
|
condition.referenceValue = null |
|
|
|
condition.valueType = "string" |
|
|
|
} |
|
|
|
@ -206,7 +206,7 @@ |
|
|
|
on:change={e => onOperatorChange(condition, e.detail)} |
|
|
|
/> |
|
|
|
<Select |
|
|
|
disabled={condition.noValue} |
|
|
|
disabled={condition.noValue || condition.operator === "oneOf"} |
|
|
|
options={valueTypeOptions} |
|
|
|
bind:value={condition.valueType} |
|
|
|
placeholder={null} |
|
|
|
|
|
|
|
@ -114,7 +114,7 @@ export const buildLuceneQuery = filter => { |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (type === "number" && !Array.isArray(value)) { |
|
|
|
if (type === "number" && typeof value === "string") { |
|
|
|
if (operator === "oneOf") { |
|
|
|
value = value.split(",").map(item => parseFloat(item)) |
|
|
|
} else if (!isHbs) { |
|
|
|
|