Using Tabulator version 4.4.3
When filtering the checkbox in the usual way, everything works fine. If I set a filtered checkbox to true on a column, it functions correctly:
headerFilterEmptyCheck: function (value) {
return !value;
},
However, when using persistentFilter: true and reloading the page, the checkbox filter will only display true=true. It never shows false or null when unchecked (resulting in 0 rows being returned).
Here is my Column Definition:
{
title: "Do it?",
field: "hasToDoIt",
responsive: 0,
formatter: "tickCross",
formatterParams: {
allowEmpty: true,
allowTruthy: false,
tickElement: "<i class='fa fa-check'></i>",
crossElement: ""
},
headerFilter: "tickCross",
headerFilterEmptyCheck: function (value) {
return !value; //only filter when the value is true
},
sorter: "string",
headerSortTristate: true,
width: 80,
align: 'center'
},
This is my Table Definition:
new Tabulator("#" + config.Key, {
index: "_id",
reactiveData: true,
persistenceMode: true,
persistenceID: "accountsummary",
persistentSort: true,
persistentFilter: true,
autoResize: true,
layout: "fitColumns",
responsiveLayout: true,
virtualDomBuffer: 100,
headerSortTristate: true,
data: this.state.Data,
columns: this.state.Columns,
groupBy: "Geo",
groupToggleElement: "header",
groupStartOpen: true,
sortOrderReverse: true,
initialSort: [{ column: "Geo", dir: "asc" }, { column: "Account", dir: "asc" }],
rowClick: (e, row) => {
});
}
After selecting the checkbox, reloading the page should show the filtered results. Unchecking the box should display all rows again.