Skip to content

Commit 0cbe8d8

Browse files
committed
fix: apply default value of child to parent object
fixes #103
1 parent 0af06e7 commit 0cbe8d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/mixins/ObjectContainer.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ export default {
114114
if (value === undefined) {
115115
value = this.defaultValue(schema)
116116
if (schema.default !== undefined) value = JSON.parse(JSON.stringify(schema.default))
117+
if (value !== undefined && value !== null) {
118+
this.$set(wrapper, modelKey, value)
119+
this.$emit('input', this.value)
120+
}
117121
}
118122
return h('v-jsf', {
119123
props: {

0 commit comments

Comments
 (0)