Mon commit initial
This commit is contained in:
14
static/js/Untitled-1.py
Normal file
14
static/js/Untitled-1.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user