Please check the related article with the ready-to-use sample of custom textFilter
.
In general, you can insert any content to the header using DataFilter object. The best will inherit default logic/rendering patterns from the existing filters (in webix_debug.js you’ll find all available in your Webix version).
While filters call filterByAll
to trigger filtering, masterCheckbox
iterates through all rows and changes the values in the column where it was set:
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){
if(obj){ //dyn loading
obj[config.columnId] = checked;
master.callEvent("onCheck", [obj.id, config.columnId, checked]);
this.callEvent("onStoreUpdated", [obj.id, obj, "save"]);
}
});
master.refresh();
};
},