Last active
December 9, 2015 21:26
-
-
Save NamTThai/0552dc176d95f2d32bc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eFilter: function(item) { | |
var valid = true; | |
// this.filters is an Object that holds existing filters in all columns. | |
// Key is column name, value is filter value | |
// For example: {Dessert: "Cake", Calorie: /^\d{3}$/g}; Calorie filter is a regex indicating that number needs to have 3 digits | |
// This filter means to show only rows that have Cake in its Dessert column and 3 digits Calorie value | |
for (var headerName in this.filters) { | |
valid = valid && this.eFilterCustom(headerName, this.filters[headerName], item); | |
} | |
return valid; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment