Greetings, first off, awesome tool! Really really awesome I like it so much!
However, I have a very specific use case. I would like to build a form with the “array” type that can be expanded like I currently have. Currently it is really nice working but I seem to totalls struggle to nest the “array” type within it. I would like to generate new “vizualizationOptions” for an “attribute”. So currently you can create attributes and fill in their field but one attribute can have multiple “visualizationOptions”. Furthermore even then inside an option should be more groups.
I hope you can give me an example or idea. Currently it looks like this:
However you see there no applicable renderer found. My scheme looks like this:
{
"properties": {
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "The id of the measurement, e.g. \"battery\"."
},
"label": {
"title": "Label",
"type": "string",
"description": "The unique label of the measurement, e.g. \"Battery Level\"."
},
"attributeType": {
"title": "Attribute Type",
"type": "string",
"oneOf": [
{
"const": "null",
"title": "None"
},
{
"const": "nominal",
"title": "Nominal"
},
{
"const": "binary",
"title": "Binary"
},
{
"const": "ordinal",
"title": "Ordinal"
},
{
"const": "discrete",
"title": "Discrete"
},
{
"const": "continuous",
"title": "Continuous"
}
],
"description": "The attribute type of the measurement. Can also be \"null\"."
},
"unit": {
"title": "Unit",
"type": "string",
"description": "The unit of the measurement as a string."
},
"min": {
"title": "Min",
"type": "number",
"description": "The minimum expected value of the measurement as a number."
},
"max": {
"title": "Max",
"type": "number",
"description": "The maximum expected value of the measurement as a number."
},
"visualizationOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"title": "Type"
}
}
}
}
},
"required": [
"id",
"label",
"attributeType",
"unit"
]
}
}
}
}
and my ui scheme looks like this:
{
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/attributes",
"options": {
"showSortButtons": true,
"elementLabelProp": "id",
"detail": {
"type": "VerticalLayout",
"elements": [
{
"type": "HorizontalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/id"
},
{
"type": "Control",
"scope": "#/properties/label",
"options": {
"multi": true
}
}
]
},
{
"type": "Control",
"scope": "#/properties/attributeType",
"options": {
"format": "radio"
}
},
{
"type": "Control",
"scope": "#/properties/unit"
},
{
"type": "HorizontalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/min",
"options": {
"detail": "GENERATED"
}
},
{
"type": "Control",
"scope": "#/properties/max"
}
]
},
{
"type": "Control",
"scope": "#properties/visualizationOptions",
"options": {
"showSortButtons": true,
"elementLabelProp": "type",
"detail": {
"type": "VerticalLayout",
"elements": [
]
}
}
}
]
}
}
}
]
}
I hope you can help me! Thank you very much!