Skip to content

Commit

Permalink
Fix dialog form for default values
Browse files Browse the repository at this point in the history
  • Loading branch information
afbora committed Feb 15, 2025
1 parent 00183d9 commit 7d6054a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion panel/src/components/Dialogs/Elements/Fields.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<k-fieldset
v-if="hasFields"
:fields="fields"
:value="value"
:value="formValue"
class="k-dialog-fields"
@input="$emit('input', $event)"
@submit="$emit('submit', $event)"
Expand Down Expand Up @@ -45,6 +45,12 @@ export default {
mixins: [props],
emits: ["input", "submit"],
computed: {
formValue() {
return {
...this.$helper.field.form(this.fields),
...this.value
};
},
hasFields() {
return this.$helper.object.length(this.fields) > 0;
}
Expand Down

0 comments on commit 7d6054a

Please sign in to comment.