Closed carlosalvidrez closed 6 years ago
Hi,
Template.instance().pagination
should only be used in helper methods. In event methods you should use the second parameter of the function which gives you access to templateInstance
.
Since I don't have any context regarding where you used that piece of code, all I can say is that if you used Template.instance().pagination.currentPage( 1 )
inside a helper method the pagination will enter a loop (you shouldn't call setters in helper methods).
Thank you... it was an unrelated mistake in my part. I do understand hear/you on not using setters in helpers... thanks for getting back to me, really appreciate it.
Hi there, Wondering if it this is an actual issue or if I'm doing something wrong. As you can see in the code below, I am trying to figure out (when the meteor template is created, after pagination gets instantiated), which page I am at.
I noticed that if I call the currentPage() method, then the pagination stops working (the bootstrap paginator stops responding when I click in other pages). The strange thing is that, if I do not call it (commented below in the code), then it works well.
So, is there a known workaround? Or should I use another method/way to get the actual "current page"?
Thanks