Fix modal navigation flow back redirection
This commit is contained in:
@@ -93,7 +93,7 @@ export default {
|
||||
immediate: true,
|
||||
handler (recordPageID, oldRecordPageID) {
|
||||
if (!recordPageID) {
|
||||
this.showModal = false
|
||||
this.setDefaultValues()
|
||||
this.clearModalPreviousPage()
|
||||
}
|
||||
|
||||
@@ -134,6 +134,11 @@ export default {
|
||||
}),
|
||||
|
||||
loadRecord ({ recordID, recordPageID, values, refRecord, edit, pushModalPreviousPage = true }) {
|
||||
if (!recordID && !recordPageID) {
|
||||
this.onHidden()
|
||||
return
|
||||
}
|
||||
|
||||
this.recordID = recordID
|
||||
this.values = values
|
||||
this.refRecord = refRecord
|
||||
|
||||
@@ -111,7 +111,12 @@ export default function (ComposeAPI) {
|
||||
}
|
||||
},
|
||||
|
||||
pushModalPreviousPage ({ commit }, value) {
|
||||
pushModalPreviousPage ({ commit, state }, value) {
|
||||
const previousPage = state.modalPreviousPages[state.modalPreviousPages.length - 1] || {}
|
||||
if (previousPage.recordID === value.recordID && previousPage.recordPageID === value.recordPageID) {
|
||||
return
|
||||
}
|
||||
|
||||
commit(types.pushModalPreviousPage, value)
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user