reactive-table icon indicating copy to clipboard operation
reactive-table copied to clipboard

animation for loading?

Open javaknight opened this issue 9 years ago • 10 comments

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?

javaknight avatar Jun 22 '15 15:06 javaknight

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..

javaknight avatar Jun 22 '15 16:06 javaknight

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.

aslagle avatar Jun 23 '15 04:06 aslagle

makes sense. I'm not sure how else to set up a loading animation. I'll leave it open as a feature request. thanks.

javaknight avatar Jun 24 '15 14:06 javaknight

+1

artem-stepanov avatar Jul 02 '15 13:07 artem-stepanov

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.

stephentcannon avatar Oct 09 '15 19:10 stephentcannon

Any news on this one?

ddresch avatar Apr 06 '16 00:04 ddresch

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.

aslagle avatar Apr 06 '16 02:04 aslagle

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?

ddresch avatar Apr 07 '16 13:04 ddresch

Any news on this? seems like the obvious next thing to do

lanmower avatar Sep 23 '16 11:09 lanmower

I have fetching loading animation issues. any one help as.

dongaj avatar Sep 27 '17 06:09 dongaj