Styling of unpredictable deep nested elements
I would like to know if there is a possibilty to bind an own type of control to a schema.
Let me show you with an example what I am talking about:
[original thread by Seprech]
Styling of unpredictable deep nested elements
I would like to know if there is a possibilty to bind an own type of control to a schema.
Let me show you with an example what I am talking about:
[original thread by Seprech]
[Seprech]
uischema = {
"type": "ListWithDetail",
"scope": "#/properties/mappings",
"options": {
"detail": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/name"
},
{
"type": "Control",
"scope": "#/properties/subArray1"
}
]
}
}
}
[Seprech]
schema = {
"definitions": {
"mapping": {
"type": "object",
"properties": {
"name": {"type": "string"},
"subArray1": {
"type": "array",
"items": {
"$ref": "#/definitions/subObject"
}
}
}
},
"subObject": {
"type": "object",
"properties": {
"name": {"type": "string"},
"subArray11": {
"type": "array",
"items": {
"$ref": "#/definitions/subObject"
}
},
"subArray12": {
"type": "array",
"items": {
"$ref": "#/definitions/subObjectOthers"
}
}
}
},
"subObjectOthers": {
"type": "object",
"properties": {
"name": {"type": "string"}
}
}
},
"type": "object",
"properties": {
"name": {"type": "string"},
"mappings": {
"type": "array",
"items": {
"$ref": "#/definitions/mapping"
}
}
},
"required": ["title"]
}
[Seprech]
data = {
"mappings": [
{
"name": "The Name",
"subArray1": [
{
"name": "The Name",
"subArray11": [
{
"name": "The Name11",
"subArray11": [
{
"name": "The Name111",
"subArray11": [
{
"name": "The Name1111"
}
],
"subArray12": [
{
"name": "The Name1112"
}
]
}
]
}
],
"subArray12": [
{
"name": "The Name12"
}
]
}
]
}
]
}