Skip to content
Snippets Groups Projects

Fix dialog-Object-Form's internal dialog-mode-handling

Merged permcu requested to merge fix-dialog-object-forms-internal-dialog-mode-handling into master
Files
4
<template>
<mobile-fullscreen-dialog
v-model="dialog"
v-model="dialogMode"
max-width="555px"
:close-button="false"
>
@@ -26,7 +26,7 @@
:valid.sync="valid"
@loading="handleLoading"
@save="handleSave"
@cancel="dialog = false"
@cancel="dialogMode = false"
>
<template v-for="(_, slot) of $scopedSlots" #[slot]="scope"
><slot :name="slot" v-bind="scope"
@@ -35,7 +35,7 @@
</template>
<template #actions>
<cancel-button @click="dialog = false" :disabled="loading" />
<cancel-button @click="dialogMode = false" :disabled="loading" />
<save-button
@click="$refs.form.submit()"
:loading="loading"
@@ -67,22 +67,9 @@ export default {
},
mixins: [openableDialogMixin, objectFormPropsMixin, loadingMixin],
emits: ["cancel", "save"],
computed: {
dialog: {
get() {
return this.value;
},
set(newValue) {
this.$emit("input", newValue);
},
},
},
methods: {
close() {
this.dialog = false;
},
handleSave(items) {
this.dialog = false;
this.dialogMode = false;
this.$emit("save", items);
},
},
Loading