Closed
Description
When a condition is set on a field, there can be situations where the model has a value for this field but the condition is not valid.
To reproduce, this is the schema:
{
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"eligible": {
"type": "boolean",
"title": "Eligible for awesome things"
},
"code": {
"type":"string",
"title": "The Code"
}
}
}
and this is the form:
[
"name",
"eligible",
{
"key": "code",
"condition": "model.eligible"
}
]
The steps are:
- check "eligible": the field "code" becomes visible
- enter a value for "code"
- uncheck "eligible": the field "code" is hidden but the model still contains the value
The resulting model is:
{
"eligible": false,
"code": "a code value"
}