-
-
Notifications
You must be signed in to change notification settings - Fork 245
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 problem on numbers when using the from option #1461
Comments
Running into the same issue. I searched the coding of Gridjs and looked for a way to set a custom sorter for a |
Would like an answer on this one if possible 👍 |
@barberob @matzeeable it sounds like you are trying to perform a numeric comparison without using a custom comparator function. In JavaScript @afshinm one thing you could probably change is to first check if the values being sorted are numeric, but that will likely come with its own challenges, especially considering there is already a way to achieve numeric sorting with a custom comparator function. |
Hi, so what about, if gridjs concatenate column data, check, if there are only numbers and not use array.sort()? |
@kopepasah I understand the problem here, but i can't use custom sort when i'm using |
Describe the bug
The sorting is wrong on numbers when creating
from
an html table.To Reproduce
Steps to reproduce the behavior:
Expected behavior
This should sort it like a number 1, 2, 3, 4 becomes 4, 3, 2, 1
Screenshots
Desktop / Smartphone
not os specific
The text was updated successfully, but these errors were encountered: