Skip to content

Commit

Permalink
Merge pull request #436 from karthikiyengar/master
Browse files Browse the repository at this point in the history
#66, #30 - Support filterable property in columnMetadata
  • Loading branch information
ryanlanciaux authored Jul 3, 2016
2 parents f837c41 + d437232 commit 34c4128
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/griddle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,13 @@ var Griddle = React.createClass({
uniqueIdentifier: React.PropTypes.string
},
defaultFilter: function(results, filter) {
var that = this;
return _filter(results,
function(item) {
var arr = deep.keys(item);
for(var i = 0; i < arr.length; i++){
if ((deep.getAt(item, arr[i]) || "").toString().toLowerCase().indexOf(filter.toLowerCase()) >= 0){
var isFilterable = that.columnSettings.getMetadataColumnProperty(arr[i], "filterable", true);
if (isFilterable && (deep.getAt(item, arr[i]) || "").toString().toLowerCase().indexOf(filter.toLowerCase()) >= 0){
return true;
}
}
Expand Down

0 comments on commit 34c4128

Please sign in to comment.