-
Notifications
You must be signed in to change notification settings - Fork 405
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 broken with mixed data types #744
Comments
Hey @wolph. This isn't a bug. There's no column type called 'mixed'. you can see the supported data types here: Just some clarity: Default type is 'text', so it assumes if no type is specified, the data would be string. Table doesn't do the casting of type for you, so you might have to do this in prep work before supplying it to the table. Perhaps it should do the overhead of casting internally? I'll keep this ticket open while we think about it. |
I think you have the option of sanitizing your data, and go with the default string sort or number. Or use a sortFn function, and cast there. Although option 1 would win in performance. |
Personally I would think that defaulting to a string type cast would be good. You should still be able to disable it for performance sake, but having a library that works with everything out of the box is a good thing :) |
Issue Type
Specs
What version are you using?
2.19.1
What browser?
Google Chrome
Expected Behavior
A working sort
Actual Behavior
Errors because the values are expected to be strings
Steps to Reproduce the Problem
Please detail your steps here
jsfiddle
https://jsfiddle.net/fe5ast61/
The text was updated successfully, but these errors were encountered: