Skip to content

Commit

Permalink
https://github.com/jmorrell/backbone-filtered-collection/pull/13
Browse files Browse the repository at this point in the history
  • Loading branch information
solsson committed May 3, 2016
2 parents 880672e + a118930 commit e57e2b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ function execFilter() {
}

function onAddChange(model) {
var options = arguments[arguments.length - 1];

// reset the cached results
this._filterResultCache[model.cid] = {};

Expand All @@ -89,7 +91,7 @@ function onAddChange(model) {
}
filteredIndex = filteredIndex || 0;

this._collection.add(model, { at: filteredIndex });
this._collection.add(model, _.extend({ at: filteredIndex }, options));
}
} else {
if (this._collection.get(model.cid)) {
Expand Down

0 comments on commit e57e2b9

Please sign in to comment.