In ExtJS I would create a filter like this:
store.addFilter({property: 'teamName', value: teamName});
This would filter all records with a teamName of value teamName.
How would I filter it so that it shows all records that DO NOT have this value for this field?
Use filterFn
:
A custom filter function which is passed each item in the
Ext.util.MixedCollection
in turn. Should returntrue
to accept each item orfalse
to reject it.
For example:
store.addFilter({
filterFn: function(record){
return record.get('teamName') !== 'teamName';
}
});