elementLabelProp - compose propertyName from 2+ properties

the documentation states that instead of a single property string also an array containing more then one property string could be used.

However, I cannot find an example showing this possibility.

e.g. if I have property “name” and “position” in the json schema as items in an array, how would the assignment look like?

In the UI schema I tried without any effect:
"elementLabelProp": ["position", "name"]

referencing only one property in an array works well, like
"elementLabelProp": ["position"]

Any suggestions?

Hi @anotherUser,

The “array” variant of the elementLabelProp is used for specifying a path to the property. So ["position", "name"] will try to resolve position.name of the object.

Our off the shelf renderers can only show one property of an element in the title. If you like more control then you can use a custom renderer in which you can render arbitrary UI including as many properties as you need.

1 Like

Thank you @sdirix for clearing this up! :slight_smile: