meteor-ios
meteor-ios copied to clipboard
Paginated Subscriptions?
How can I use pagination with lots of records? I did try to implement it my self by modifying the todos example and connecting it up to a very basic meteor application which simply publishes a list of meteor users.
The problem is: I use override func configureSubscriptionLoader(subscriptionLoader: SubscriptionLoader) { subscriptionLoader.addSubscriptionWithName("something", parameters: skip, limit) }
In my load more function I use something like this: skip=self.tableView.numberOfRowsInSection(0) self.loadContent()
I did play around with adding it like this aswell
override func configureSubscriptionLoader(subscriptionLoader: SubscriptionLoader) { skip=self.tableView.numberOfRowsInSection(0) subscriptionLoader.addSubscriptionWithName("something", parameteres: skip, limit) }
Everything seems to work fine records are pagination but as soon as I add a new record on the server side it basically reloads everything in the table and because skip is using self.tableView.numberOfRowsInSection(0) it removes everything else from the tableview and just shows everything what was added last.
Is there anyway I can add pagination support / fix this issue?
why dont you join new data array to the old then call reload table ?