You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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));}elseif(this.collection.comparator{newModels.sort(bind(this.collection.comparator,this.collection));}else{// This only happens when parent got a .set with options.at definedthis._runFilters();}returnnewModels;}
The text was updated successfully, but these errors were encountered:
The code in ampersand-collection is a custom build and is in need of swapping out for the lodash version, There's an issue in that repo for it here AmpersandJS/ampersand-collection#59
I am also getting wierd values with this version. I used a function with a single argument to return a value for the item to be sorted on, but that gave broken results.
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:
The text was updated successfully, but these errors were encountered: