I want to display a Conbobox with different option labels and values. The markup should result into something like this:
<select class="validate valid select" id="#/properties/signal-input">
<option value="id-1" label="Signal 1"></option>
<option value="id-2" label="Signal 2"></option>
</select>
I am using react and the vanilla renderer and my schema looks currently like this:
"signals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"signal": {
"type": "string",
"enum": [
"Signal 1",
"Signal 2"
]
}
}
}
}
Of course this does set the value and label equal.
From this discussion, I guessed the schema should more look like this
"signals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"signal": {
"type": "string",
"oneOf": [
{const: 'id-1', title: 'Signal 1'},
{const: 'id-2', title: 'Signal 2'}
]
}
}
}
}
But this did not work and the rendered item is just a simple input filed. From the implementation here:
I expected that to work.
Maybe my schema is wrong or missing some detail?
Thanks for any help
===
Ralph