Click datatable master checkbox EVENT

HOW TO CATCH Click datatable master checkbox EVENT ?

Hello @duynq2197 ,
You can catch the change in the state of a checkbox button with the help of the onCheck event:

    on:{
        onCheck:function(rowId, colId, state){
          var control = table.getHeaderContent("cm1");
         //get master checkbox state
          var stateCh = control.isChecked();
          console.log(stateCh )
        }
    }

Please take a look at the snippet:
https://snippet.webix.com/e2x3wui9

thanks, but its not what i need.

onCheck will execute every time checkbox each row be checked.

I just wanna know when we click master checkbox

@duynq2197 ,
As a solution, you can use onHeaderClick event and get master checkbox state:

    var control = table.getHeaderContent("cm1");
    //get master checkbox state
    var state = control.isChecked();

Please check the snippet:
https://snippet.webix.com/p4jkxfb7

Nice solution.!!!