diff --git a/client/web/compose/src/views/Admin/Modules/Records/List.vue b/client/web/compose/src/views/Admin/Modules/Records/List.vue index 8bd68be5d..52a2620a6 100644 --- a/client/web/compose/src/views/Admin/Modules/Records/List.vue +++ b/client/web/compose/src/views/Admin/Modules/Records/List.vue @@ -109,7 +109,7 @@ export default { fields = fields.length ? fields : this.module.fields // Init block - this.block = new compose.PageBlockRecordList({ + const block = new compose.PageBlockRecordList({ blockIndex: 0, options: { moduleID: this.$attrs.moduleID, @@ -126,15 +126,20 @@ export default { showDeletedRecordsOption: true, presort: 'createdAt DESC', enableRecordPageNavigation: true, - // Set allrecords configuration - allRecords: true, hideConfigureFieldsButton: false, - rowViewUrl: 'admin.modules.record.view', - rowEditUrl: 'admin.modules.record.edit', - rowCreateUrl: 'admin.modules.record.create', }, }) + block.options = { + ...block.options, + allRecords: true, + rowViewUrl: 'admin.modules.record.view', + rowEditUrl: 'admin.modules.record.edit', + rowCreateUrl: 'admin.modules.record.create', + } + + this.block = block + // If the page changed we need to clear the record pagination since its not relevant anymore if (this.recordPaginationUsable) { this.setRecordPaginationUsable(false) diff --git a/client/web/compose/src/views/Admin/Modules/Records/View.vue b/client/web/compose/src/views/Admin/Modules/Records/View.vue index afb2151f3..b483c35e7 100644 --- a/client/web/compose/src/views/Admin/Modules/Records/View.vue +++ b/client/web/compose/src/views/Admin/Modules/Records/View.vue @@ -218,13 +218,11 @@ export default { methods: { createBlocks () { this.fields.forEach(f => { - const block = new compose.PageBlockRecord() const options = { moduleID: this.$attrs.moduleID, fields: f, } - block.options = options - this.blocks.push(block) + this.blocks.push(new compose.PageBlockRecord({ options })) }) },