hypertrace / hypertrace-ui

UI for Hypertrace
Other
25 stars 12 forks source link

Feat: Provide external loading triggers #2532

Closed aneeshsharma closed 12 months ago

aneeshsharma commented 12 months ago

Description

Any changes that were external to the table that would trigger a new data fetch, couldn't be accounted for when displaying the loading state in the table. Also, since the data source is external and a stream, it is not possible for the table to know when a new data fetch might have been triggered.

So, added loadingTrigger: Observable to the TableDataSource as an optional field, which can be provided by the user which should emit whenever a change happens that will trigger a new data fetch.

This will require the user to provide the trigger but I couldn't find any other way for the table to know by itself if a new data fetch is going to be triggered.