Hello,
I'm not sure I correctly understood how isLoading is working
I got a grid that looks like this :
Am I doing something wrong or is it supposed to work like that ?
Great! Then this is where we will update on any related further development.
Regards,Svetoslav
I'm "bmtheo" it's the issue I created right after answering here
Thanks for referencing it here
Hi,
As Mason Zeimet suggested, this is the way it can be solved, since the loading indicator in this case is designed to be displayed only to be shown when there is no data.
Since there is already an issue created on GitHub, I suggest if you have any further questions to address them here:https://github.com/IgniteUI/igniteui-angular/issues/5517
Thanks for your answer, I just tried it and indeed this workaround works !
I'll still create an issue on github because to me it's a bug and we should not reset the data everytime the loading is set to true
To solve this, I used an isLoading$ subject to keep track of when data is currently loading, and I subscribe to it at the level where the IgxGrid is implemented. When a new loading comes through as 'true', I set the grid data to null and then set the grid.isLoading property to my subject's value.
The main issue I believe is that when the grid still has data, the loading icon will not display, so give an empty data set to clear it.
if (this.isLoading$){ this.isLoading$.pipe(takeUntil(this.destroy$)).subscribe(loading => { if (loading) { this.grid.data = new Array(); } this.grid.isLoading = loading; }); }