Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sort objects by matched key only (fixes #78) #79

Merged
merged 2 commits into from
Sep 30, 2019
Merged

fix: sort objects by matched key only (fixes #78) #79

merged 2 commits into from
Sep 30, 2019

Conversation

bernharduw
Copy link
Contributor

What:

When using multiple keys to filter objects, the objects are always sorted by the last key in the list (if the ranks are otherwise equal), no matter which key actually matched. This PR fixes that behavior.

Why:

Sorting by last key is unexpected and most probably unintended py the original PR.

How:

I set the key to be sorted on to the one that actually matched.

Checklist:

  • Documentation N/A
  • Tests
  • Ready to be merged
  • Added myself to contributors table

Copy link
Owner

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thank you!

@kentcdodds
Copy link
Owner

In retrospect this can be considered more of a bugfix than a breaking change 👍 Thank you!

@kentcdodds kentcdodds merged commit 32360b2 into kentcdodds:master Sep 30, 2019
@kentcdodds
Copy link
Owner

🎉 This PR is included in version 4.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants