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

OrderBy Sort on more Type? #25

Closed
BallisticPain opened this issue Feb 8, 2017 · 3 comments
Closed

OrderBy Sort on more Type? #25

BallisticPain opened this issue Feb 8, 2017 · 3 comments

Comments

@BallisticPain
Copy link

Thanks for adding the OrderBy, however, I'm still unable to swap to using ngx-pipes as your OrderBy only handles strings essentially. It needs to be able to handle more data types. Dates, Booleans, Numbers, etc... I added sorting booleans to the one I linked in the previous ticket.

    if(isBoolean(a) || isBoolean(b)) {
      if (a == b) return 0;
      if (a && !b) return -1;
      if (!a && b) return 1;
    }

Thanks!
Jarvis

danrevah added a commit that referenced this issue Feb 9, 2017
@danrevah
Copy link
Owner

danrevah commented Feb 9, 2017

It does support date, booleans, numbers and strings.
Can you show me exactly what's not working?

Take a look at the tests I've added (they work with dates & boolean values, and there's older tests for numbers): 1e709bd

danrevah added a commit that referenced this issue Feb 12, 2017
@danrevah
Copy link
Owner

Since you haven't responded yet I have been digging into this, trying to find what isn't working properly. I found some issue and fixed it, it might be related to your issue as well.
Its released to version 1.4.3.

Update me to let me know if that fix your case.
If not, please provide more details and an example of your object and usage.

@danrevah
Copy link
Owner

danrevah commented Feb 18, 2017

It's been 10 days and you haven't responded.
I'm closing this issue for now.

Let me know if this needs to be reopened.

Thanks.

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

No branches or pull requests

2 participants