aslagle / reactive-table

A reactive table designed for Meteor
https://atmospherejs.com/aslagle/reactive-table
Other
328 stars 138 forks source link

animation for loading? #234

Open javaknight opened 9 years ago

javaknight commented 9 years ago

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

aslagle commented 9 years ago

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.

javaknight commented 9 years ago

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

artem-stepanov commented 9 years ago

+1

stephentcannon commented 8 years ago

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.

ddresch commented 8 years ago

Any news on this one?

aslagle commented 8 years ago

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.

ddresch commented 8 years ago

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?

lanmower commented 7 years ago

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

dongaj commented 6 years ago

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