-
{{/if}}
diff --git a/client/res/templates/record/list.tpl b/client/res/templates/record/list.tpl
index 84c45ae8ab..e92b44a9d8 100644
--- a/client/res/templates/record/list.tpl
+++ b/client/res/templates/record/list.tpl
@@ -228,13 +228,17 @@
{{#if showMoreEnabled}}
-
+
{{#if showCount}}
diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js
index 32ce93e8b6..7137a39f5f 100644
--- a/client/src/views/record/list.js
+++ b/client/src/views/record/list.js
@@ -657,12 +657,6 @@ class ListRecordView extends View {
this.actionQuickView({id: id});
},
- /** @this ListRecordView */
- 'click [data-action="showMore"]': async function () {
- this.showMoreRecords();
-
- this.focusOnList();
- },
'mousedown a.sort': function (e) {
e.preventDefault();
},
@@ -2026,6 +2020,15 @@ class ListRecordView extends View {
this.processLinkClick(target.dataset.id);
});
+ this.addHandler('click', '[data-action="showMore"]', (e, target) => {
+ if (target.dataset.ownerCid && target.dataset.ownerCid !== this.cid) {
+ return;
+ }
+
+ this.showMoreRecords();
+ this.focusOnList();
+ })
+
if (typeof this.collection === 'undefined') {
throw new Error('Collection has not been injected into views/record/list view.');
}
@@ -3254,7 +3257,7 @@ class ListRecordView extends View {
*/
showMoreRecords(options, collection, $list, $showMore, callback) {
collection = collection || this.collection;
- $showMore = $showMore || this.$el.find('.show-more');
+ $showMore = $showMore || this.$el.find(`.show-more[data-owner-cid="${this.cid}"]`);
$list = $list || this.$el.find(this.listContainerEl);
options = options || {};