@monolith-forensics/monolith-ui 1.2.64 → 1.2.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -238,7 +238,14 @@ const Rules = ({ rules = [], combinator, showCombinator, filterDefinitions, onDe
|
|
|
238
238
|
onUpdateRootCombinator(e);
|
|
239
239
|
};
|
|
240
240
|
const handleOperatorChange = (rule, operator) => {
|
|
241
|
-
|
|
241
|
+
const prevValue = rule.value;
|
|
242
|
+
const isBetween = operator.value.toLowerCase().includes("between");
|
|
243
|
+
const newValue = !isBetween
|
|
244
|
+
? !!(prevValue === null || prevValue === void 0 ? void 0 : prevValue[0])
|
|
245
|
+
? [prevValue[0]]
|
|
246
|
+
: undefined
|
|
247
|
+
: prevValue;
|
|
248
|
+
onUpdate(Object.assign(Object.assign({}, rule), { operator, value: newValue }));
|
|
242
249
|
};
|
|
243
250
|
return (_jsxs(_Fragment, { children: [showCombinator === true && (_jsx(DropDownMenu, { variant: "outlined", data: [
|
|
244
251
|
{ label: "AND", value: "and" },
|