Skip to content

table-sort.js cannot sort by custom data #442

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

Closed
midlan opened this issue Oct 11, 2020 · 1 comment
Closed

table-sort.js cannot sort by custom data #442

midlan opened this issue Oct 11, 2020 · 1 comment

Comments

@midlan
Copy link

midlan commented Oct 11, 2020

Imagine table where I put to one of the columns timing in miliseconds.
95674950-fe64c300-0bb3-11eb-926c-6a82efcd5ea6

I would like to sort that column (find some of the slowest queries). Currently it sorts the column like a string, so it leads to not sort the data properly.

Solution would be to support some dataset value to help with the proper sorting. E.g. data-position HTML attribute.

@dg
Copy link
Member

dg commented Oct 13, 2020

I added data-order attribute

@dg dg closed this as completed Oct 13, 2020
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