Replies: 1 comment 5 replies
-
Same issue not able to get the values at load time |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to add a new operator for JsonLogic. Here my code :
const multiselect_contains = { label: "Contains", labelForFormat: "CONTAINS", formatOp: (field, op, values, valueSrc, valueType, opDef, operatorOptions, isForDisplay) => { if (valueSrc == "value") return '${field} CONTAINS (${values.join(", ")})'; else return '${field} CONTAINS ${values}'; }, reversedOp: "multiselect_not_contains", jsonLogic2: "some-in", jsonLogic: (field, op, vals) => ({ "some": [ field, {"in": [{"var": ""}, vals]} ] }) }; const multiselect_not_contains = { isNotOp: true, label: "Not contains", labelForFormat: "NOT CONTAINS", formatOp: (field, op, values, valueSrc, valueType, opDef, operatorOptions, isForDisplay) => { if (valueSrc == "value") return '${field} NOT CONTAINS (${values.join(", ")})'; else return '${field} NOT CONTAINS ${values}'; }, reversedOp: "multiselect_contains" };
In the edition time, it works nicely. I can choose the operators and the values.
But in the load time, it doesn't work. The field is correctly selected but not the operator and the values.
What did I do wrong ?
Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions