You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a schema with type: object and if/then conditionally adding a new property with a default value. This works as expected. But if I wrap the whole schema in a wrapping object, the default value prefilling no longer works.
Expected: A required field "foo" appears with default value "foo default value"
Actual: A required field "foo" appears with default value "foo default value"
I would expect that the same default behaviour happens even if the object is wrapped in another object.
Steps To Reproduce
Open this Playground example which is the exact same schema as above but it's wrapped in a wrappingObject.
Click "checkbox"
Expected: A required field "foo" appears with default value "foo default value"
Actual: A required field "foo" appears with NO default value.
Environment
- Mac
- Google Chrome Version 125.0.6422.142 (Official Build) (arm64)
- Playground
Anything else?
Playground options
Playground has multiple options that control default behaviour:
Populate minItems in arrays
allOf defaults behaviour
Object fields default behavior
I tried changing all these settings but none of them didn't solve the issue.
Duplicate?
Here's another open issue that looks very similar: #3599
It's similar because in #3599 the default behaviour seems to be first as expected, but when wrapped in an object, default prefilling is not working anymore. It's different in a sense that #3599 is about allOf but this bug is about if/then/else.
Feel free to close this one if you think this is duplicate of #3599
The text was updated successfully, but these errors were encountered:
Prerequisites
What theme are you using?
core
Version
5.x (current Playground version)
Current Behavior
I have a schema with
type: object
andif/then
conditionally adding a new property with a default value. This works as expected. But if I wrap the whole schema in a wrapping object, the default value prefilling no longer works.Expected Behavior
Expected: A required field "foo" appears with default value "foo default value"
Actual: A required field "foo" appears with default value "foo default value"
I would expect that the same default behaviour happens even if the object is wrapped in another object.
Steps To Reproduce
wrappingObject
.Expected: A required field "foo" appears with default value "foo default value"
Actual: A required field "foo" appears with NO default value.
Environment
Anything else?
Playground options
Playground has multiple options that control default behaviour:
I tried changing all these settings but none of them didn't solve the issue.
Duplicate?
Here's another open issue that looks very similar: #3599
It's similar because in #3599 the default behaviour seems to be first as expected, but when wrapped in an object, default prefilling is not working anymore. It's different in a sense that #3599 is about allOf but this bug is about if/then/else.
Feel free to close this one if you think this is duplicate of #3599
The text was updated successfully, but these errors were encountered: