I use syncfusion angular GridComponent in my project. I want the grid to have a spinner once it's created and the spinner should spin until the data is loaded. to start a spinner I wrote a function for when the grid is created:
document-table.component.html
<ejs-grid #grid (created)="creadted()" ...>
...
</ejs-grid>
document-table.component.ts:
@ViewChild('grid') grid: GridComponent
ngOnChanges(changes: SimpleChanges){
this.tableData = changes.data.currentValue;
if(changes.data.currentValue != null){
this.grid.hideSpinner=()=>false; //it doesn't work and the spinner still spinning
}
created(){
this.grid.hideSpinner =()=>true; //spinner start spinning
}
How can I stop the spinner after the data is loaded?