'Tabulator - Is there a way to prevent header filtering and only apply header filters programmatically?

I have a table that has 15 columns with headerFilters using ajaxFiltering.

I would like to be able to type in all of my filter criteria into the header filters and then press a button to apply the filters all at once. I have tried using headerFilterLiveFilter:false but that only stops the live filtering while typing in that headerFilter. Once I click into another headerFilter it applies the previous filter and I have to wait to type the next criteria.

Anything I missed in the docs or any workarounds are much appreciated.



Solution 1:[1]

Apply a customHeaderFilter. Then in your function you can decide what to do.

Solution 2:[2]

If you want to apply filters that the user cant change then you shouldn't be using header filters, you should be using standard filters, these can be added by calling the setFilter function.

table.setFilter("name", "!=", "Steve");

This function can also accept multiple filters at once, as an array:

table.setFilter([
    {field:"age", type:">", value:52}, //filter by age greater than 52
    {field:"height", type:"<", value:142}, //and by height less than 142
    {field:"name", type:"in", value:["steve", "bob", "jim"]}, //name must be steve, bob or jim
]);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 kmoser
Solution 2 Oli Folkerd