Closed sgaynetdinov closed 4 years ago
Sorry, I don't understand what you mean
http://brutusin.org/json-forms/ schema
{
"$schema": "http://json-schema.org/draft-03/schema#",
"type": "object",
"properties": {
"a": {
"title": "a",
"type": "string"
},
"b": {
"title": "b",
"type": "string"
}
}
}
Initial data
{
"a": "",
"b": 1234
}
{
"b": "1234"
}
how to make that "a" key was not removed?
I understand now. The problem is that HTML inputs don't have different states for null and empty values. I think we can add a working mode that let differentiate these states by letting the user toggle the inputs and move from these states: disabled (null) <-> enabled (empty) < -> enabled (non-empty). Do you feel capable of doing it?
may return an empty string instead of the null?
https://github.com/brutusin/json-forms/blob/master/src/js/brutusin-json-forms.js#L673
return ""
https://github.com/brutusin/json-forms/blob/master/src/js/brutusin-json-forms.js#L938
return ""
This could work for your case. I'll think about a more generic solution and keep you informed. Thanks!
This error has already been fixed
How to cancel the deletion?