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