Hi All,
I’m using material react json forms version 3.0.0-alpha. I have multiple if then else statements wrapped in an allOf array. my if then else statements are mainly to validate that if one field is populated then another field must also be populated e.g:
"allOf": [
{
"if": {
"properties": {
"dataType": {
"const": "STRING"
}
},
"required": ["dataType"]
},
"then": {
"required": ["length"]
}
},
{
"if": {
"properties": {
"precision": {
"pattern": "[0-9]"
}
},
"required": ["precision"]
},
"then": {
"properties": {
"dataType": {
"const": "NUMERIC"
}
}
}
},
{
"if": {
"properties": {
"scale": {
"pattern": "[0-9]"
}
},
"required": ["scale"]
},
"then": {
"properties": {
"dataType": {
"const": "NUMERIC"
}
}
}
}
]
This works fine when being rendered in a Table e.g:
However when the part of the schema to which the allOf statement applies includes a nested object and hence an MaterialArrayLayout would normally be used instead I get the following:
is there anything I can do to add support for the multiple if then else statements on a schema object that contains a nested schema object.
Thanks in advance!