In connection with this question here, is there an idiomatic way to implement pagination using Meteor, which does not show intermediate results in the client (which causes the page to jump).
I got the application from the example leaderboard, in fact, on the client that I use:
Template.scores.created = -> Meteor.autosubscribe -> Meteor.subscribe 'players', Session.get('page_size'), Session.get('current_page'), sortOrder()
And server
Meteor.publish 'players', (page_size, current_page, sort) -> Players.find({}, sort: sort, skip: (current_page-1)*page_size, limit: page_size)
Due to the fact that the meteor subscribes to new data and then deletes the old data, all new elements are displayed shortly before deleting old elements, which leads to a flickering effect, which I would like to get rid of.
source share