Skip to content

Commit 60dbf04

Browse files
committed
feat(orderBy): add support for custom comparators
With this change the 3rd argument is interpreted as a comparator function, used to compare the values returned by the predicates. Leaving it empty falls back to the default comparator and a value of `false` is a special case that also falls back to the default comparator but reverses the order. Thus the new implementation is backwards compatible. This commit also xpands the documentation to cover the algorithm used to sort elements and adds a few more unit and e2e tests (unrelated to the change). Helps with angular#12572 (maybe this is as close as we want to get). Fixes angular#13238 Fixes angular#14455 Closes angular#5123 Closes angular#8112 Closes angular#10368
1 parent d2ec9d7 commit 60dbf04

File tree

2 files changed

+806
-173
lines changed

2 files changed

+806
-173
lines changed

0 commit comments

Comments
 (0)