Refactors

This commit is contained in:
Mel O'Hagan 2022-08-17 16:44:48 +01:00
parent a843796408
commit 95b3518a0d
1 changed files with 2 additions and 9 deletions

View File

@ -112,7 +112,7 @@
Constants.OperatorOptions.NotEmpty.value,
]
condition.noValue = noValueOptions.includes(newOperator)
if (condition.noValue || condition.operator === "oneOf") {
if (condition.noValue || newOperator === "oneOf") {
condition.referenceValue = null
condition.valueType = "string"
}
@ -207,14 +207,7 @@
/>
<Select
disabled={condition.noValue || condition.operator === "oneOf"}
options={condition.operator === "oneOf"
? [
{
value: "string",
label: "Binding",
},
]
: valueTypeOptions}
options={valueTypeOptions}
bind:value={condition.valueType}
placeholder={null}
on:change={e => onValueTypeChange(condition, e.detail)}