1
0
Fork 0
mirror of synced 2024-09-28 15:21:28 +12:00

Merge pull request #7303 from Budibase/bug/sev2/isin-conditionalui

Only allow bindings for 'Is In' operator in conditional UI
This commit is contained in:
melohagan 2022-08-18 09:06:22 +01:00 committed by GitHub
commit c5a3fa161d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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}

View file

@ -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) {