-
Notifications
You must be signed in to change notification settings - Fork 419
Closed
Description
Describe the bug
At the moment, when an enum field is used in a elementLabelProp option, the raw enum value is used, without allowing to translate it via the translate function.

Expected behavior
The value should be sent to the translate function for customizing.
Steps to reproduce the issue
Create a JsonForms with :
Json Schema
{
type: 'array',
items: {
type: 'object',
properties: {
message: {
type: 'string',
maxLength: 3,
},
messageType: {
type: 'string',
enum: ['MSG_TYPE_1', 'MSG_TYPE_2'],
},
},
},
}
UI Schema :
{
type: 'Control',
scope: '#',
options: {
elementLabelProp: 'messageType',
detail: {
type: 'HorizontalLayout',
elements: [
{ type: 'Control', scope: '#/properties/message' },
{ type: 'Control', scope: '#/properties/messageType' },
],
},
},
}
Data :
[
{
message: 'El Barto was here',
messageType: 'MSG_TYPE_1',
},
{
message: 'Yolo',
},
]
Screenshots
No response
Which Version of JSON Forms are you using?
v.3.2.1
Framework
React
RendererSet
Material
Additional context
I think an old bug was repurposed to highlight this behavior but I can't find it anymore.