kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 193 forks source link

Subscription fail if `FlowRouter.go()` when using package `aslagle:reactive-table` with server-side pagination. #650

Open qrobin opened 8 years ago

qrobin commented 8 years ago

I use package from Amy Slagle named aslagle:reactive-table. There is a feature to make paginated subscriptions for every rendered page. So, if I use it, somehow FlowRouter doesn't wait for that subscription if I use FlowRouter.go().

The single way to fix it for is to use BlazeLayout.render(), but I need to make work the FlowRouter.go(), it is very important in my case.

Amy said:

As far as I can tell this is getting triggered by flow router calling Tracker.invalidate, but I'm not familiar enough with flow router to know what's going on.

I'm not able to fix it alone, please help me.

UPDATE Just tried BlazeLayout.reset() before FlowRouter.go() and it works fine now. Is it the right way to fix it, or there is another better? Because it resets all layout, and I would like to reset only some nested dynamic templates. Is there way to do it the right way?

Update 2 Sorry, figured it out with FlowRouter.reload();.