Fix record page not loading when navigating to new record from create record view
This commit is contained in:
@@ -1980,7 +1980,7 @@ export default {
|
||||
},
|
||||
|
||||
handleAddRecord () {
|
||||
const refRecord = this.options.linkToParent ? this.record : undefined
|
||||
const refRecord = this.options.linkToParent && this.recordID !== NoID ? this.record : undefined
|
||||
const pageID = this.recordPageID
|
||||
|
||||
if (!(pageID || this.options.rowCreateUrl)) return
|
||||
|
||||
@@ -306,25 +306,33 @@ export default {
|
||||
|
||||
return this.previousPages.length > 0
|
||||
},
|
||||
|
||||
uniqueID () {
|
||||
return `${this.page.pageID}-${this.recordID}`
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
recordID: {
|
||||
immediate: true,
|
||||
handler () {
|
||||
this.record = undefined
|
||||
this.initialRecordState = undefined
|
||||
this.refresh()
|
||||
},
|
||||
},
|
||||
|
||||
'page.pageID': {
|
||||
immediate: true,
|
||||
handler (pageID) {
|
||||
if (pageID === NoID) return
|
||||
handler () {
|
||||
console.log('1')
|
||||
if (this.page.pageID === NoID) return
|
||||
|
||||
this.layouts = this.getPageLayouts(this.page.pageID)
|
||||
this.layout = undefined
|
||||
console.log('1')
|
||||
},
|
||||
},
|
||||
|
||||
uniqueID: {
|
||||
immediate: true,
|
||||
handler () {
|
||||
console.log('2')
|
||||
this.record = undefined
|
||||
this.initialRecordState = undefined
|
||||
this.refresh()
|
||||
console.log('2')
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user