Buenos días
Tengo un problema al usar el método DataFiltered en el tabulador
table.on("dataFiltered", function(filters, rows){ //filters - array of filters currently applied //rows - array of row components that pass the filters });Cuando la tabla se carga, el método se activa. Estoy tratando de desencadenar un evento cuando el usuario filtra la tabla usando el filtro de encabezado. ¿Hay alguna manera de que pueda usar un método onchange en los encabezados?
var Table = new Tabulator("#gridData", { height: 800, ajaxURL:"getData.php", layout: "fitData", selectable:1, columns:[ {title:"Col", field:"Col1", sorter:"string", headerFilter:"list", headerFilterParams:{valuesLookup:true, clearable:true, autocomplete:true}}, {title:"Col2", field:"Col2", sorter:"string", headerFilter:"list", headerFilterParams:{valuesLookup:true, clearable:true, autocomplete:true}}, {title:"Col3", field:"Col3", sorter:"string", headerFilter:"list", headerFilterParams:{valuesLookup:true, clearable:true, autocomplete:true}}, {title:"Col4", field:"Col4", sorter:"string", headerFilter:"input"}, {title:"Col5", field:"Col5", sorter:"string", headerFilter:"input"}, ], ajaxResponse:function(url, params, response){ return response.data; //pass the data array into Tabulator } }); Table.on("dataFiltered", function(filters, rows){ //filters - array of filters currently applied //rows - array of row components that pass the filters alert("table filtered"); });