Skip to content

Commit

Permalink
Merge pull request #11 from saicheck2233/issue#129
Browse files Browse the repository at this point in the history
Issue#129: Clean data after onChange between oneOf
  • Loading branch information
saicheck2233 authored Jul 11, 2023
2 parents 3c5560e + 5c91027 commit 235f79d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/js/brutusin-json-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -919,9 +919,9 @@ if (typeof brutusin === "undefined") {
}
var value = removeEmptiesAndNulls(object[prop], ss);
//Check if user assign an empty String in the default field, if true return empty string instead of null
if (ss.default == "" && value === null) {
value = "";
}
if (ss.default == "" && value === null) {
value = "";
}
if (value !== null) {
clone[prop] = value;
nonEmpty = true;
Expand Down Expand Up @@ -1237,6 +1237,10 @@ if (typeof brutusin === "undefined") {
renderInfoMap[schemaId].value = value;
clear(titleContainer);
clear(container);
if (s === undefined) {
data = new Object();
return;
}
//console.log(id,s,value);
var r = renderers[s.type];
if (r && !s.dependsOn) {
Expand Down

0 comments on commit 235f79d

Please sign in to comment.