2

Needing for "global search" filter interface for modern Tabulator, something like UNIX grep command, or default search of Datatables (ref1,ref2).

This Tabulator issue was closed with no solution, and filter Guide say nothing about full-search (perhaps multiple filter with all columns and boolean OR).

Oli Folkerd
  • 7,510
  • 1
  • 22
  • 46
Peter Krauss
  • 13,174
  • 24
  • 167
  • 304

1 Answers1

2

The issue you reference includes the correct answer in the first reply, which is why it is closed.

It creates a custom filter function that looks for the value passed into the value property on params object.

The function is then called using the setData function

//custom filter function
function matchAny(data, filterParams){
    //data - the data for the row being filtered
    //filterParams - params object passed to the filter

    var match = false;

    for(var key in data){
        if(data[key] == filterParams.value){
            match = true;
        }
    }

    return match;
}

//set filter to custom function
table.setFilter(matchAny, {value:5});
Oli Folkerd
  • 7,510
  • 1
  • 22
  • 46