How to display a spinning icon until a long function call ends ?

Hi ,

I am making a long function call before showing the its return data into a datatable. I have already used spinning wait icon before with the help of this snippet https://webix.com/snippet/0672dde8

But in this case, I am not able use it properly. The code goes something like below:

var result = longFunction(data1, data2);

$$('mydatatable').parse(result);

In this case I do not have any url to fetch the data, just the function call taking long time before it goes to the datatable.parse(result) line.

How can I show the spinning icon here?

Hello,
Webix methods are synchronous, so in this case please remove delay and it’s better not to use ajax request. Finally, when you have used all needed methods just add hide to the icon.

If I remove delay, how will I show it ? Could you please elaborate little more and show me how to do it?

Please, check this sample: https://snippet.webix.com/6bvfnpvw
In this snippet extend used only once, then is called clearAll to remove data, and, finally, I added hideProgress just to hide the icon

Thanks Nastja1