3
0

Fix modal navigation flow back redirection

This commit is contained in:
Kelani Tolulope
2023-10-27 15:33:58 +01:00
parent 969b4887f1
commit 6ef444784e
2 changed files with 12 additions and 2 deletions
@@ -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
+6 -1
View File
@@ -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)
},