WebIX Loading Icon Spin until method is completed

22 Views Asked by At

In Webix I have a method like this

function show_progress_icon(delay) {
  $$("topView").disable();
  $$("topView").showProgress({
    type: "icon",
    delay: delay,
    hide: true
  });
  setTimeout(function () {
    $$("topView").enable();
  }, delay);
}

This is based on a delay given as input.

Instead, how do I perform showProgress in starting of some code and hide at the end of the code?

Example, I want this

function A() {
//showProgress Icon
//Do Some Tasks
//hideProgress Icon
}
1

There are 1 best solutions below

0
kuro no fukkatsu On

Use $$("topView").hideProgress(). Remove delay and hide from showProgress.