Skip to content

Commit

Permalink
issue#103
Browse files Browse the repository at this point in the history
Adding new item to an array doesnt show default values when Initial Data
 is passed
  • Loading branch information
jasonchuah4 committed Jun 27, 2023
1 parent 44f27b2 commit 93c14eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/brutusin-json-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,9 @@ if (typeof brutusin === "undefined") {
if (!value) {
if (typeof initialValue !== "undefined" && initialValue !== null) {
value = getInitialValue(id);
if (value === null && typeof s.default !== "undefined") {
value = s.default;
}
} else {
value = s.default;
}
Expand Down

0 comments on commit 93c14eb

Please sign in to comment.