Skip to content

Commit eaec461

Browse files
add a check on values setter in base form
this way you can use the data as default values
1 parent 3f620ae commit eaec461

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

generator/templates/Crud/src/components/BaseForm.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
value: {
2626
immediate: true,
2727
handler() {
28-
this.values = this.setFormValues(this.value.values);
28+
if (Object.keys(this.value.values).length !== 0) {
29+
this.values = this.setFormValues(this.value.values);
30+
}
2931
},
3032
deep: true,
3133
},

0 commit comments

Comments
 (0)