Reactive Triger an event when all data is loaded
398
Views
3
Comments
New
Frontend (App Interfaces)

In some use cases we want to postpone the loading of (parts of) the screen until all data sources are loaded. E.g. To avoid screen flickering or that there is a dependency with all the fetched data.

We now have a CheckIsAllDataLoaded action in all aggregates on after fetch that sets a local variable IsAllDataLoaded= IsAllDataLoaded OR (Aggr1.IsDataFetched AND Aggr2.IsDataFetched) 

Would be great to have a an event thats triggered when all data is loaded.

It's easy to forget some condition which makes it error-prone.

Good one!

I fully agree with the need. I will promote the vote on this one.

I face this issue so much that I ended up creating a component to help me manage it. It's called "FetchControl" and takes in the "IsDataFetched" values and triggers an event when all values are true.

Nonetheless, It would still be better to have this implemented by the platform.