‘items’: {
‘type’: ‘object’,
‘properties’: {
‘formattedAddress’: {
‘title’: ‘Adresse’, <---------- Doesnt change the title
‘type’: ‘string’
}
}
}
[original thread by FBurner]
‘items’: {
‘type’: ‘object’,
‘properties’: {
‘formattedAddress’: {
‘title’: ‘Adresse’, <---------- Doesnt change the title
‘type’: ‘string’
}
}
}
[original thread by FBurner]
[FBurner]
Is it possible to hide the table head or do i need a custom renderer?
[FBurner]
{
‘type’: ‘Control’,
‘scope’: ‘#/properties/positionLocation/’,
‘label’: ‘Einsatzorte’,
‘options’: {
‘showSortButtons’: true,
‘detail’: {
‘elements’: [
{
‘type’: ‘Control’,
‘scope’: ‘#/properties/formattedAddress’,
‘label’: ‘Adresse’ // <<<<----------
}
]
}
}
}
Label seems to be having no impact either inside of array item
We have two different array renderers: One which layouts the array to look like a table for the cases where this makes sense (object
item with only “primitive” properties as columns) and one which renders each array element on its own. The later one can also be forced by adding a valid options.detail
.
In your example the table renderer is used, because the detail
is not valid. You’re missing the type
of the root ui schema element in detail
, e.g. VerticalLayout
. Sadly the table renderer doesn’t check the title
for the column name. This is certainly a bug and needs to be fixed.
When using the non-table renderer (by adding type: ‘VerticalLayout’
to the detail), both the
titleand the
labelare respected. When you also want to label each element you can use the label for array elements,
elementLabelProp`.
We offer no customization at the moment to hide the table head, so yes for this you would need to add a custom renderer. Note that you probably can reuse most of the table renderer from JSON Forms, so this probably doesn’t result in a lot of code.