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 Apr 12, 2024. It is now read-only.
Falls back on built-in comparison function if user-provided comparison function
fails to break a tie between elements being ordered.
Closes#14881
BREAKING CHANGE: Using `orderBy` with a custom `comparator` function while
simultaneously setting `reverse` to `true` results in a potentially different
list order than previously.
Specifically, when the custom `comparator` fails to sort two objects (compares
them as being "equal"), the objects would previously have remained in their
original order in the array relative to each other. They will now switch places
as the `reverse` will be more accurately respected.
To migrate, make sure that your custom `comparator` properly differentiates
between all cases that your code base cares about and that "equal" cases are
not order dependent. We expect that due to the nature of this change, since the
entries are considered "equal", that very few projects will be affected by this
change in all but a minor visual manor that still respects the expected
operation being performed.
0 commit comments