Hello everyone.
I have a special requirement. In my application, all properties needs to be an identifier.
I have a this schema:
{
"type": "object",
"properties": {
"id1": {
"type": "string",
"oneOf": [
{
"const": "1",
"title": "I love it"
},
{
"const": "2",
"title": "I dont like it"
}
]
},
"id2": {
"type": "string",
"oneOf": [
{
"const": "1",
"title": "I love it"
},
{
"const": "2",
"title": "I dont like it"
}
]
},
"id98": {
"type": "string",
"oneOf": [
{
"const": "1",
"title": "I love it"
},
{
"const": "2",
"title": "I dont like it"
}
]
}
}
}
I want to achieve a table, where each header is the title of the const, the associated cell is a checkbox, with a special readonly column where we would put the property name/label. Something like this:
Of course I need a custom renderer. The tester would be “all properties are string, oneOf with same const”. Unfortunately, it’s imposible for me to create such a tester, because the tester only test each property separetely. I would need to make a renderer for the whole object. But is it really possible?
I think it would need to be a Layout, but it doesn’t seem to be the way to go
