Hi!
I’d like to customize MaterialArrayControlRenderer. It needs to use conditional rendering using data from schema.json.
{
"title": "Node",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "schema.json",
"properties": {
"nodes": {
"type": "array",
"items": {
"type": "object",
"required": ["unique_id", "name", "type"],
"properties": {
"unique_id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": ["action", "walk"]
}
},
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "action"
}
}
},
"then": {
"type": "object",
"properties": {
"function": {
"type": "string"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "walk"
}
}
},
"then": {
"type": "object",
"properties": {
"text": {
"type": "string"
}
}
}
}
}
]
}
}
}
}
But in MaterialArrayControlRenderer props I don’t have any information about fields data. Only data about row number. What helpers from @jsonforms/react can I use to get fields data?
[original thread by Alexandr Sashin]