Closed carlosalvidrez closed 3 years ago
You can set the limit either on init:
Template.myList.onCreated(function () {
this.pagination = new Meteor.Pagination(MyCollection, {
perPage: 20
});
});
or by calling after init
this.pagination.perPage(20);
The default number of records returned is 10.
The documents returned is calculated like this:
skip()
+ perPage()
* (currentPage()
-1)skip()
+ perPage()
* currentPage()
Thanks! Can I buy you a cup of coffee? Let me know if you have any sort of donation/fund-me page. I've been using your library and are very grateful that you not only shared it, but you still respond to issues/questions. Cheers!
There's no need to donate, but I appreciate the thought. I'm happy with contributing to the open source scene that I'm relying on so often myself.
I'd just like to control the total maximum number of records the server should fetch for the client. Wondering if a "limit" clause would work, or if I should think of this as a product of the number of items per page and the page number in turn.
Thanks!