-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
The sort functions used by this package and ampersand-collection are not equivalent.
Ampersand-collection uses it's own method while here lodash.sortby is used. I'm getting different results.
Overwriting _sortModels to use the following fixes the issue:
bind = require('lodash.bind');
...
_sortModels: function (newModels) {
if (this.comparator) {
newModels.sort(bind(this.comparator, this));
} else if (this.collection.comparator {
newModels.sort(bind(this.collection.comparator, this.collection));
} else {
// This only happens when parent got a .set with options.at defined
this._runFilters();
}
return newModels;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels