Webix Jet - Datatable Collection as Datasource - Loading Progress

Hi,
no matter if I use
onStoreLoad: function (itemId) {
$$(“tasks_datatable”).hideOverlay();
}

or
onBeforeLoad: function () {
this.showOverlay(“Loading…”);
},
onAfterLoad: function () {
this.hideOverlay();
},

I cannot get the overlay working when using data collections via the “models” usage of webix jet. This means I can show it but I cannot hide it as neither onStoreLoad or onAfterLoad is called.

Anybody could help me with that?
If I just load it by parsing the url to the datatable directly everything is ok, but I would like to use the concept of webix jet and the data models.

Thanks,
Martin

Assuming that you have a model with datacollection inside, you can use something like next

  //placed in $oninit
  //shows overlay by default
  this.showOverlay("Loading..."); 
  //use data loading promise
  model.data.waitData.then(function(){
     //hide overlay after data loading
     $$("tasks_datatable").hideOverlay();
  });

here data.waitData is the data promise, so you can call a showOverlay as part of initialization, and assign a code to hide it after data loading.

Some more details about waitData usage

http://docs.webix.com/api__link__ui.treetable_waitdata_other.html

http://docs.webix.com/desktop__data_loading.html#promiseapiindataloading

Thank you so much, Maksim!