Hello, I have a problem. Can someone help me?
How can I make the master checkboxes in the DataTable select all the checkboxes on the current page instead of only the displayed checkboxes, and the checkboxes on the previous pages are not selected.
webix.ui.datafilter.mCheckbox = webix.extend({
refresh:function(master, node, config){
node.onclick = function(){
this.getElementsByTagName("input")[0].checked = config.checked = !config.checked;
var column = master.getColumnConfig(config.columnId);
var checked = config.checked ? column.checkValue : column.uncheckValue;
master.data.each(function(obj){
//getItemNode checks visibility, other code is default
if(obj && master.getItemNode(obj.id)){
obj[config.columnId] = checked;
master.callEvent("onCheck", [obj.id, config.columnId, checked]);
this.callEvent("onStoreUpdated", [obj.id, obj, "save"]);
}
});
master.refresh();
};
},
}, webix.ui.datafilter.masterCheckbox);