Open javaknight opened 9 years ago
btw, I tried this pattern
http://stackoverflow.com/questions/12879762/displaying-loader-while-meteor-collection-loads
but it doesn't work, I think, because it's not an ordinary subscription, and it's always ready, it seems. unless I'm mistaken..
You're right, it's not an ordinary subscription. It actually starts a new subscription every time the filter (or the sorting or the page) changes, and waits until the new one is ready before switching and stopping the old one. So after the initial load there is always a ready subscription. I did it this way because it seemed like a better experience to have the page change smoothly - it looked bad to have the table disappear temporarily while the new subscription was loading, particularly on page changes. If I was going to add a loading state, it would have to be for all subscription changes, not just filtering.
makes sense. I'm not sure how else to set up a loading animation. I'll leave it open as a feature request. thanks.
+1
It would make sense for this to be a template referenced on the settings so that reactive table could ust render the template until the subscription fires ready.
Any news on this one?
There is a ready
option now, that can be used to decide whether to display a loading animation in other templates. You pass in a ReactiveVar for it and it will change from false to true when the subscription is ready. It only changes on initial load, not when the subscription changes.
Managed to use the new ready
configuration, it's working for the initial loading as you described.
The next loads e.g. when paging are not visible to the user and it can be a confusing if a slow connection is happening.
What about a second parameter to handle these kind of loads?
Any news on this? seems like the obvious next thing to do
I have fetching loading animation issues. any one help as.
I'm looking for some kind of way to indicate to the user that my server is fetching the new result set when the user changes a filter. Is there a way to incorporate this somehow?