Operators supported by Field of type select #919
-
I want to create field of type create on lhs. The problem is, I cannot see any operator like > or < in the operator list. Are these types of operators supported by select field? If yes, can anyone tell how it can be done. If no, what is the workaround. Sample expression :- MRP > Price. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Please post your config |
Beta Was this translation helpful? Give feedback.
-
Please describe nested fields with mrp: {
label: 'MRP',
type: "!struct",
subfields: {
price: {
label: 'Price',
type: 'number',
},
discount: {
label: 'Discount',
type: 'number',
},
},
}, Currently, there is only 1 select control to choose a field.
|
Beta Was this translation helpful? Give feedback.
-
Sorry, I misunderstood you. import merge from "lodash/merge";
const types = {
...InitialConfig.types,
select: merge({}, InitialConfig.types.select, {
widgets: {
select: {
operators: [
"select_equals",
"select_not_equals",
"is_null",
"is_not_null",
// add your ops
"less",
"less_or_equal",
"greater",
"greater_or_equal",
]
}
}
}), |
Beta Was this translation helpful? Give feedback.
Put types inside config: