-
Notifications
You must be signed in to change notification settings - Fork 896
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
Sorting order errors #385
Comments
hello, The sorting order fails on this case : http://codepen.io/anon/pen/VaKgZB |
@laudeon Thanks that i am not alone. Sorting fails for me in exact the same way. I am no javascript guru, i have no idea what is going wrong there. Any advice? |
Having the same issue. http://codepen.io/CBeloch/pen/RaLepP It works when I rename the "PlayStation" to "PlayStation 1". if (!s) {
return 0;
} at the beginning Pull request hast been submitted |
The sorting fails when the search variable contains mixed cyrilics (unicode?) and digits. BTW, I found an error: if (/[^\x00-\x80]/.test(oFxNcL + oFyNcL) && oFxNcL.localeCompare) {
var comp = oFxNcL.localeCompare(oFyNcL);
return comp / Math.abs(comp);
} If both Unicode strings are equal, comp = 0, so we return 0/0. Also there's error should not set zero on this level, so we add if. if (/[^\x00-\x80]/.test(oFxNcL + oFyNcL) && oFxNcL.localeCompare) {
var comp = oFxNcL.localeCompare(oFyNcL);
if (comp !== 0) return comp;
} Please check my solution. |
Hi I'm having a number sorting issue... I have hundreds of values e.g. 1.23; -0.23, 0.02 etc But the out of the box sorting doesn't seem to handle it... Any thoughts? We're using data attributes to apply the sort. |
I'm adding this issue as a collection of all sorting order related issues.
The text was updated successfully, but these errors were encountered: