onAfterAdd not firing, possible bug with assigned datacollection to table.

struggling to understand the eventing in webix.

I’m trying to do something like this (in Typescript):

var dt = new webix.DataCollection()

{
   view: 'datatable',
   data: dt,
   on: {
      onAfterAdd: function(id, index){
          console.log('onAfterAdd')
      }
   }
}

Then when I add something to the datacollection I do get the data row showing in the table, but I don’t get the onAfterAdd fired!!

As the DataCollection has its own API (including theadd method), you need to attach events directly to it:

http://webix.com/snippet/3ccb4264

thanks, I eventually figured out that I also need to refresh()