How to dynamically introduce a spinning icon or progress bar while loading a datatable

Hi ,

I have a tree, if you select any item from that tree , it causes a datatable to be loaded. I am also using a spinning icon/progressbar to denote when data is loading to the datatable.

However, I am not able to use the spinning icon dynamically. I am setting a hardcoded 2 seconds for it. Depending on how heavy or light data I have the spinning icon either keeps spinning or stops spinning.

How can I make it dynamic so that it stop when data is fully loaded ?

My snippet is here : Code Snippet

Thanks.

Hi! Check this snippet: https://webix.com/snippet/0672dde8

Thanks it is working.
Just one question further, should ‘myUrl’ be the URL of the page in which I am currently showing the tree and datatable ?

Can I not skip the "myUrl’ part ? Because in my application the Url could be varying based on which data I am showing.

Thanks nevertheless.

"myUrl’ is a link by which you will fetch data from the server. If you have all the data in the application then the spinner you don’t need, everything will work fast enough