I have the following setup: Im listing all items on the frontpage (publication frontpageItems) and listing selected items on a userpage (publication userpageItems). Im sorting the items on both pages on a lastactivity field and im doing this on the server side publication and not on the client side since I want the frontpage to be static once loaded.
- Whenever the page loads initialy everything sorts fine, ie: 1,2,3.
- When I navigate from frontpage to the user I have a subset of 2,3 for example
- When I navigate back to frontpage the sort is as follows: 2,3,1
I assume this is because meteor caches the items, but the sort order is definitely wrong here. Refreshing the frontpage makes the sort correct again.
Is there any way to fix this? ie, clear the subscription on page switch for exampe? Im using iron-router btw to subscribe to the publications before page load. Adding client side sorting + reactive:false on the client solves my problem btw, but I cant use this since I DO need reactivity on the limit of the subscription for pagination/infinite scrolling.
Or, as a workaround, is it possible to disable reactivity on the client for sort, but keep it for limit?