Open nicolaskruchten opened 7 years ago
I tried using csv and the order output without sort option is Ab, aA, aa, ab
However if use sortAs option like yours, I get the strange unexpected order as you ended up. I will take a look at the source code to see if I could find something...
I suspect it is those -1, 1 in source code that make the order like this. I will try to continue to study.
Thanks for the suggestion, but I have a fix coming up already, this issue was just a note to self for me :)
On Mon, Sep 25, 2017 at 04:07 hkbeer notifications@github.com wrote:
I suspect it is those -1, 1 in source code that make the order like this. I will try to continue to study.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nicolaskruchten/pivottable/issues/789#issuecomment-331807105, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMbA2XuTzvuULC0eWJ9g_kEw5l7X-nDks5sl18cgaJpZM4PgwfG .
Great
What is your fix ? anywhere I can see it in action ? :) Would that make abc come in front of BCD easier in sorting (ie ignore case)
Are you taking about the generic naturalSort or the sortAs helper? This issue is about the latter.
On Thu, Sep 28, 2017 at 05:58 hkbeer notifications@github.com wrote:
What is your fix ? anywhere I can see it in action ? :) Would that make abc come in front of BCD easier in sorting (ie ignore case)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nicolaskruchten/pivottable/issues/789#issuecomment-332788906, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMbAwxOwqB8nXBiWukVt4oQ2NoEpqo1ks5sm23cgaJpZM4PgwfG .
the naturalSort.... it is minor at the moment, but if you could think of way to order without care of case in future pls add as an option :-)
OK. This issue is about sortAs
, not naturalSort
.
In sortAs does it accept wild cat like “a”* etc?
No wild cards, no.
On Fri, Oct 6, 2017 at 07:47 hkbeer notifications@github.com wrote:
In sortAs does it accept wild cat like “a”* etc?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nicolaskruchten/pivottable/issues/789#issuecomment-334732723, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMbA2fFGEqM_DllJiPPT93GcRI1dVoQks5sphM4gaJpZM4PgwfG .
I now resort on having a custom sorting table rendered and use it as SortAs parameter in run-time to solve my ordering. So I am good now. This way I can modify the sorting of my whatever wish using SQL.
Thanks :-)
["Ab","aA","aa","ab"].sort(sortAs(["Ab","Aa"])) ... ["Ab","ab","aa","aA"]
Why does
aa
come beforeaA
?