@monolith-forensics/monolith-ui 1.2.65 → 1.2.66
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.
|
@@ -239,12 +239,14 @@ const Rules = ({ rules = [], combinator, showCombinator, filterDefinitions, onDe
|
|
|
239
239
|
};
|
|
240
240
|
const handleOperatorChange = (rule, operator) => {
|
|
241
241
|
const prevValue = rule.value;
|
|
242
|
+
let newValue;
|
|
242
243
|
const isBetween = operator.value.toLowerCase().includes("between");
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
: prevValue;
|
|
244
|
+
if (!isBetween) {
|
|
245
|
+
newValue = !!(prevValue === null || prevValue === void 0 ? void 0 : prevValue[0]) ? [prevValue[0]] : undefined;
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
newValue = [(prevValue === null || prevValue === void 0 ? void 0 : prevValue[0]) || "", (prevValue === null || prevValue === void 0 ? void 0 : prevValue[1]) || ""];
|
|
249
|
+
}
|
|
248
250
|
onUpdate(Object.assign(Object.assign({}, rule), { operator, value: newValue }));
|
|
249
251
|
};
|
|
250
252
|
return (_jsxs(_Fragment, { children: [showCombinator === true && (_jsx(DropDownMenu, { variant: "outlined", data: [
|