Pagination filters reset on page reload

We’re looking to repair a fairly minor issue in our project. I would guess it has an easy solution.

We’re using the electronifiejs pages pagination package (fork of Alethes), so the amount of options we have is limited.

Basically, if we do an update on Galaxy, it forces an automatic page reload, which ends up resetting the search filters.

We have made some attempts at saving this information in sessions or so on, but the problem is, on the automatic reloads, onCreated and onRendered are not triggering.

If we were able to find a place to hook in to the automatic reloads, we would be able to solve this issue. Any advice on how we could hook in to this to run a function that could re-run the filters?

Thanks

You may be able to leverage Meteor._reload.onMigrate.

We use it to simply wait until the user starts a new session/refreshes to get the latest code, but you may find some answers in this thread or in the code.

I HAVE YOUR ANSWER!

You want this guys package for persistent sessions. It’s awesome! I’m using the heck out of it.

u2622:persistent-session

It says unsupported, but, works great for me.

The other way to do it is save to the user collection on click. It’s really about the same thing but with more overhead.

1 Like