-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
core
Version
5.24.1
Current Behavior
There is a problem with nested if...then
conditions inside properties
. With liveOmit
and omitExtraData
enabled, the value of a property that is displayed conditionally is automatically removed.
Here is the JSON schema I am testing:
{
"type": "object",
"properties": {
"object": {
"title": "Object",
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"booleanProperty": {
"title": "Boolean Property",
"default": true,
"type": "boolean"
}
},
"if": {
"properties": {
"booleanProperty": {
"const": true
}
}
},
"then": {
"properties": {
"otherProperty": {
"title": "Other Property",
"type": "string",
"enum": [
"Hello",
"World"
]
}
},
"required": [
"otherProperty"
]
}
}
}
}
When the booleanProperty
is set to true, the otherProperty
field is displayed in the form, but its value cannot be changed because it is automatically cleared.
Expected Behavior
The value of otherProperty
should not be cleared when booleanProperty
is set to true.
Steps To Reproduce
- Go to Playground.
- Try to change Other Property value.
Environment
- OS:
- Node:
- npm:
Anything else?
No response