diff --git a/client/web/compose/src/components/PageBlocks/RecordListBase.vue b/client/web/compose/src/components/PageBlocks/RecordListBase.vue index b35d86653..11b441132 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 7e9579b8e..ff78c684a 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: { - 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') }, },