Repository navigation
Conditional oneOf options for select field are not rendered #249
Copy link
Copy link
Closed
Description
In v1, a select field (uom) that relies on conditional oneOf definitions inside allOf (if/then) renders without any options.
The same schema worked correctly in v0.
Expected Behavior
When:
• type = "service" → uom select should display service-related options
• type = "goods" → uom select should display goods-related options
The dropdown should dynamically populate based on the selected type.
Actual Behavior (v1)
The uom field renders as a select input, but:
• No options are visible when the dropdown is opened
• The field is required, but user cannot select any value
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "goods",
"oneOf": [
{
"const": "goods",
"title": "Goods"
},
{
"const": "service",
"title": "Service"
}
],
"x-jsf-presentation": {
"inputType": "radio"
}
},
"uom": {
"title": "UoM",
"type": "string",
"x-jsf-presentation": {
"inputType": "select",
"gridColumn": 5,
"size": "sm"
}
}
},
"required": [
"type",
"uom"
],
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "service"
}
},
"required": [
"type"
]
},
"then": {
"properties": {
"uom": {
"oneOf": [
{
"const": "each",
"title": "each"
},
{
"const": "year",
"title": "year"
},
{
"const": "month",
"title": "month"
},
{
"const": "week",
"title": "week"
},
{
"const": "day",
"title": "day"
},
{
"const": "hour",
"title": "hour"
},
{
"const": "project",
"title": "project"
}
]
}
}
},
"else": {
}
},
{
"if": {
"properties": {
"type": {
"const": "goods"
}
},
"required": [
"type"
]
},
"then": {
"properties": {
"uom": {
"oneOf": [
{
"const": "each",
"title": "each"
},
{
"const": "1/2 cubic yard",
"title": "1/2 cubic yard"
},
{
"const": "assembly",
"title": "assembly"
},
{
"const": "bag",
"title": "bag"
},
{
"const": "bale",
"title": "bale"
}
]
}
}
},
"else": {
}
}
]
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
danielcardoso5 commentedon Aug 7, 2026
Hey @denatys, thanks for reporting this!
We have already shipped a few updates to v1 that fix the conditional options functionality:
disallowNewConditionalOptionswas introduced in fix: add option for new conditional options behavior #267 to opt into this new behaviorLatest release 1.2.15 already includes the changes above.
What's currently missing is parsing properly the schema properties
defaultkeyword as you have in the schema ("default": "goods"). I have opened a new PR for it in #269 and it should ship soon.danielcardoso5 commentedon Oct 7, 2026
All fixes are present since the 1.2.16 release