diff --git a/src/layout/components/GenericCreateUpdateForm/index.vue b/src/layout/components/GenericCreateUpdateForm/index.vue index cb08f29ab..2c014a6c6 100644 --- a/src/layout/components/GenericCreateUpdateForm/index.vue +++ b/src/layout/components/GenericCreateUpdateForm/index.vue @@ -198,10 +198,12 @@ export default { type: Function, default(res, method, vm, addContinue) { const route = this.getNextRoute(res, method) + if (!(route.params && route.params.id)) { route['params'] = deepmerge(route['params'] || {}, { 'id': res.id }) } route['query'] = deepmerge(route['query'], { 'order': this.extraQueryOrder, 'updated': new Date().getTime() }) + this.$emit('submitSuccess', res) this.emitPerformSuccessMsg(method, res, addContinue) diff --git a/src/views/assets/Platform/PlatformList.vue b/src/views/assets/Platform/PlatformList.vue index 1ffb23deb..9253f331d 100644 --- a/src/views/assets/Platform/PlatformList.vue +++ b/src/views/assets/Platform/PlatformList.vue @@ -125,7 +125,8 @@ export default { }, dropdown: [] } - } + }, + lastTab: '' } }, computed: { @@ -133,10 +134,14 @@ export default { return `/api/v1/assets/platforms/?category=${this.tab.activeMenu}` } }, + deactivated() { + window.localStorage.setItem('lastTab', this.tab.activeMenu) + }, activated() { setTimeout(() => { + this.tab.activeMenu = window.localStorage.getItem('lastTab') this.$refs.genericListTable.reloadTable() - }, 500) + }, 300) }, async mounted() { try {