Override operator label or widget #821
Answered
by
ukrbublik
cosimasgenome
asked this question in
Q&A
-
I am trying to use the 'is_not_empty' operator with a different label on the frontend, dependent on what field it's being used for. Is there a way to conditionally change the label for an operator? |
Beta Was this translation helpful? Give feedback.
Answered by
ukrbublik
Dec 5, 2022
Replies: 1 comment 1 reply
-
Depending on the field: fields: {
color: {
label: "Color",
type: "select",
// override operator label
widgets: {
select: { // depends on `type`
opProps: {
is_not_empty: {
label: "is not empty"
},
}
}
},
} Or depending on the field type: types: {
text: merge(InitialConfig.types.text, {
widgets: {
text: { // depends on `type`
opProps: {
is_not_empty: {
label: "is not empty"
},
}
}
}
}),
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cosimasgenome
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Depending on the field:
Or depending on the field type: