Skip to content

Commit 06fc436

Browse files
authored
Merge pull request #2 from IgorHalfeld/master
fix: add immediate option on schema watch property
2 parents 3f38fdd + 61c973d commit 06fc436

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/FormContainer.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@
4242
* When schema is changed it updates values with it.
4343
* @param {object} schema
4444
*/
45-
schema (schema) {
46-
this.setupValuesWith(schema, this.values);
45+
schema: {
46+
immediate: true,
47+
handler (schema = this.schema) {
48+
const values = this.values || this.initial;
49+
this.setupValuesWith(schema, values);
50+
}
4751
}
4852
},
4953
@@ -151,10 +155,6 @@
151155
152156
render () {
153157
return this.$scopedSlots.default(this.scope);
154-
},
155-
156-
mounted () {
157-
this.setupValuesWith(this.schema, this.initial);
158158
}
159159
};
160160
</script>

0 commit comments

Comments
 (0)