Skip to content
Snippets Groups Projects
Commit 0c617c17 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch '894-dialogobjectform-does-not-clear-fields-on-successful-creation' into 'master'

Resolve "DialogObjectForm does not clear fields on successful creation"

Closes #894

See merge request !1299
parents 576e80a2 e5c58807
No related branches found
No related tags found
1 merge request!1299Resolve "DialogObjectForm does not clear fields on successful creation"
Pipeline #141815 canceled
......@@ -226,13 +226,17 @@ export default {
messageKey: snackbarTextKey,
color: "success",
});
this.resetModel();
},
resetModel() {
this.itemModel = JSON.parse(
JSON.stringify(this.isCreate ? this.defaultItem : this.editItem)
);
},
updateModel() {
// Only update the model if the dialog is hidden or has just been mounted
if (this.forceModelItemUpdate || !this.firstInitDone || !this.dialog) {
this.itemModel = JSON.parse(
JSON.stringify(this.isCreate ? this.defaultItem : this.editItem)
);
this.resetModel();
}
},
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment