Skip to content

Commit

Permalink
fix: apply default value of child to parent object
Browse files Browse the repository at this point in the history
fixes #103
  • Loading branch information
albanm committed Jul 28, 2020
1 parent 0af06e7 commit 0cbe8d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mixins/ObjectContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ export default {
if (value === undefined) {
value = this.defaultValue(schema)
if (schema.default !== undefined) value = JSON.parse(JSON.stringify(schema.default))
if (value !== undefined && value !== null) {
this.$set(wrapper, modelKey, value)
this.$emit('input', this.value)
}
}
return h('v-jsf', {
props: {
Expand Down

0 comments on commit 0cbe8d8

Please sign in to comment.