This commit is contained in:
2020-02-25 23:25:55 +00:00
parent ff6683f7d5
commit 5482ef30cd
5 changed files with 44 additions and 20 deletions

View File

@@ -500,14 +500,11 @@ export default {
//Logic for detecting if a post or put: if id then it was a post, if no id then it was a put
if (res.data.id) {
//Handle "post" of new record (CREATE)
// vm.obj = res.data;
// window.$gz.form.setFormState({
// vm: vm,
// dirty: false,
// readOnly: res.readOnly ? true : false
// });
//change url to new record in history and trigger navigate but with the id at the end instead of zero:
//change url to new record in history
//NOTE: will not cause a new navigate, almost nothing does unless forced with a KEY property or using router.GO()
//but will trigger navigation guard beforeRouteUpdate which we use here in this form
//to fetch data again
vm.$router.replace(
vm.$route.fullPath.slice(0, -1) + res.data.id
);