@appscode/ui-builder
Version:
## Motivation
68 lines (67 loc) • 1.35 kB
JSON
{
"type": "single-step-form",
"schema": {
"$ref": "schema#/"
},
"discriminator": {
"schoolType": {
"type": "string"
}
},
"elements": [
{
"type": "radio",
"schema": {
"$ref": "discriminator#/properties/schoolType"
},
"options": [
{
"text": "Primary School",
"value": "primary"
},
{
"text": "High School",
"value": "high"
}
]
},
{
"type": "input",
"schema": {
"$ref": "schema#/properties/name"
},
"label": {
"text": "name"
},
"onChange": "deleteClass1"
},
{
"type": "reusable-element",
"schema": {
"$ref": "schema#/properties/grade"
},
"dataContext": {
"schoolType": {
"$ref": "discriminator#/properties/schoolType"
},
"schoolName": {
"$ref": "schema#/properties/name"
},
"studentName": {
"$ref": "data#/properties/studentName"
}
},
"functionCallbacks": {
"updateStudentName": {
"$ref": "parentFunctions#/updateName"
}
},
"alias": "grade",
"label": {
"text": "schoolGrade"
},
"show_label": true,
"moduleResolver": "fetchGradeJsons"
}
]
}