Files
sgl/static/js/Untitled-1.py
2025-12-19 09:43:33 +00:00

14 lines
659 B
Python

table.setFilter("colors", "keywords", "red green blue"); //returns rows with a colors filed containing either the word "red", "green", or "blue"
table.setFilter("colors", "keywords", "red green blue", {matchAll:true}); //returns rows with a colors filed containing ALL the words "red", "green" & "blue"
function customFilter(data, filterParams){
//data - the data for the row being filtered
//filterParams - params object passed to the filter
return data.name == "bob" && data.height < filterParams.height; //must return a boolean, true if it passes the filter.
}
table.setFilter(customFilter, {height:3});
table.refreshFilter();