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
{{ message }}
This repository was archived by the owner on May 17, 2018. It is now read-only.
Currently at the end of the setSorting function, this is happening:
if (delComp) delete this.comparator;
if (delFullComp && fullCollection) delete fullCollection.comparator;
However, this doesn't work as expected if a default comparator is defined on the collection. Instead, it will fallback to inheriting the default comparator, which has interesting results (and could be desirable in some cases). What effectively ends up happening is a sorting of the sorted data. It will sort the fullCollection properly and then apply the default comparator to the already sorted data.
What I would propose is explicitly setting this.comparator to null when there is a sortKey present, and removing all together when there is no sortKey (which restores the 'default' sort).
Currently at the end of the
setSortingfunction, this is happening:However, this doesn't work as expected if a default
comparatoris defined on the collection. Instead, it will fallback to inheriting the defaultcomparator, which has interesting results (and could be desirable in some cases). What effectively ends up happening is a sorting of the sorted data. It will sort thefullCollectionproperly and then apply the defaultcomparatorto the already sorted data.What I would propose is explicitly setting
this.comparatorto null when there is a sortKey present, and removing all together when there is nosortKey(which restores the 'default' sort).