Guys, trying JsonForms, how can I concatenate a static text, for example inside a label, with the text of another control that I send in the data?

[original thread by Salim Castellanos]

Hi, this is currently not possible.
You would need to provide your own label. You can look at the code of the label implementation:

So I would suggest to take the MaterialLabelRenderer and provide your own mapStateToProps function and use this connected component by registering it: https://jsonforms.io/docs/custom-renderers see step 2 and 3 there

[Salim Castellanos]

I understand, is there any way to say that the text of a label is the variable of the data object? because for now I see that I have to burn it? How can I tell you that input text is not editable? Thank you in advance for the answers, I’m doing a proof of concept to see if we use the tool in an important project of the company, I liked it a lot.

So the easiest would be to write an own mapStateToProps method similar to the mapStateToControlProps.

The default control can only be disabled via a rule at the moment. We happily would accept a contribution which allows to provide a ‘readonly’ flag via the options of the uischema, which would be used by the control to allow to set the control not editable. We have such code already in place in the angular renderer set. This would need to be ported to the material-react set, or maybe move it to the core mapStateToControlProp method.