diff --git a/client/web/compose/src/components/PageBlocks/RecordListBase.vue b/client/web/compose/src/components/PageBlocks/RecordListBase.vue index b35d86653e..11b441132d 100644 --- a/client/web/compose/src/components/PageBlocks/RecordListBase.vue +++ b/client/web/compose/src/components/PageBlocks/RecordListBase.vue @@ -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 diff --git a/client/web/compose/src/views/Public/Pages/Records/View.vue b/client/web/compose/src/views/Public/Pages/Records/View.vue index 7e9579b8e8..ff78c684a9 100644 --- a/client/web/compose/src/views/Public/Pages/Records/View.vue +++ b/client/web/compose/src/views/Public/Pages/Records/View.vue @@ -306,25 +306,33 @@ export default { return this.previousPages.length > 0 }, + + uniqueID () { + return `${this.page.pageID}-${this.recordID}` + }, }, watch: { - recordID: { + 'page.pageID': { immediate: true, handler () { - this.record = undefined - this.initialRecordState = undefined - this.refresh() + console.log('1') + if (this.page.pageID === NoID) return + + this.layouts = this.getPageLayouts(this.page.pageID) + this.layout = undefined + console.log('1') }, }, - 'page.pageID': { + uniqueID: { immediate: true, - handler (pageID) { - if (pageID === NoID) return - - this.layouts = this.getPageLayouts(this.page.pageID) - this.layout = undefined + handler () { + console.log('2') + this.record = undefined + this.initialRecordState = undefined + this.refresh() + console.log('2') }, },