summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorMarc Hartmayer <hello@hartmayer.com>2020-06-10 23:50:48 +0200
committerMarc Hartmayer <hello@hartmayer.com>2020-06-11 02:36:06 +0200
commit06cacd7a5a974cb076dc457a15e544d5deb05441 (patch)
tree7dd6253651cb7a1b55c0549a89dd0c3f23a8556e /client
parent2d4f29cb5a300288196c94a03903bf70808efb0a (diff)
downloadwekan-06cacd7a5a974cb076dc457a15e544d5deb05441.tar.gz
wekan-06cacd7a5a974cb076dc457a15e544d5deb05441.tar.bz2
wekan-06cacd7a5a974cb076dc457a15e544d5deb05441.zip
Fix infinite scrolling for activities
This fixes the error: Uncaught TypeError: activitiesComponent.loadNextPage is not a function at constructor.reachNextPeak (sidebar.js:63) at constructor.BlazeComponent.callFirstWith (peerlibrary_blaze-components.js?hash=4049f7e3116e3d9e865392b9546e70dc479b9add:660) at constructor.scroll (infiniteScrolling.js:28) at peerlibrary_blaze-components.js?hash=4049f7e3116e3d9e865392b9546e70dc479b9add:469 at Object.Blaze._withCurrentView (view.js:533) at peerlibrary_blaze-components.js?hash=4049f7e3116e3d9e865392b9546e70dc479b9add:468 at Template._withTemplateInstanceFunc (template.js:490) at Blaze.View.eventMap.<computed> (peerlibrary_blaze-components.js?hash=4049f7e3116e3d9e865392b9546e70dc479b9add:467) at view.js:879 at Object.Blaze._withCurrentView (view.js:533)
Diffstat (limited to 'client')
-rw-r--r--client/components/activities/activities.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js
index 23ab70ed..edfaab2a 100644
--- a/client/components/activities/activities.js
+++ b/client/components/activities/activities.js
@@ -7,7 +7,7 @@ BlazeComponent.extendComponent({
// XXX Should we use ReactiveNumber?
this.page = new ReactiveVar(1);
this.loadNextPageLocked = false;
- const sidebar = this.parentComponent(); // XXX for some reason not working
+ const sidebar = Sidebar;
sidebar.callFirstWith(null, 'resetNextPeak');
this.autorun(() => {
let mode = this.data().mode;
@@ -43,16 +43,15 @@ BlazeComponent.extendComponent({
});
});
},
-}).register('activities');
-
-BlazeComponent.extendComponent({
loadNextPage() {
if (this.loadNextPageLocked === false) {
this.page.set(this.page.get() + 1);
this.loadNextPageLocked = true;
}
},
+}).register('activities');
+BlazeComponent.extendComponent({
checkItem() {
const checkItemId = this.currentData().activity.checklistItemId;
const checkItem = ChecklistItems.findOne({ _id: checkItemId });