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:
commit
221d46ce05
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue