filterFunction (record) Boolean
The filterFunction is a function used to test records from the store to determine if they should be part of the record array.
Example
var allPeople = store.peekAll('person'); allPeople.mapBy('name'); // ["Tom Dale", "Yehuda Katz", "Trek Glowacki"] var people = store.filter('person', function(person) { if (person.get('name').match(/Katz$/)) { return true; } }); people.mapBy('name'); // ["Yehuda Katz"] var notKatzFilter = function(person) { return !person.get('name').match(/Katz$/); }; people.set('filterFunction', notKatzFilter); people.mapBy('name'); // ["Tom Dale", "Trek Glowacki"]
Parameters:
-
record
DS.Model
Returns:
-
Boolean
- `true` if the record should be in the array
Please login to continue.