-
Notifications
You must be signed in to change notification settings - Fork 16
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
Bug fix: add local sorting if location filter is active #98
Bug fix: add local sorting if location filter is active #98
Conversation
Could we solve this natively without an additional dependency? For example https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Array/sort could work. An example implementation of this could be found in https://github.com/florianschmidt1994/quarantaenehelden-firebase-functions/blob/master/functions/index.js#L103 |
+1 for doing it with array sort |
@kenodressel @Maurice22 updated to use native |
Just discovered |
done |
The issue with those variables is that they are set asynchronously by react. I need to check if location will always be available when we need it. I think I will refactor the code in this branch before continuing with the review. |
I'm pretty sure it is always available (assumption based on my testing), but feel free to test yourself :) |
I think |
Alright, I added issue #100 for future refactoring. |
documentation for helper function: https://lodash.com/docs/4.17.15#orderBy
Before
After