Skip to content
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

Sort by data-attribute #45

Closed
fisherspoon opened this issue May 23, 2021 · 2 comments
Closed

Sort by data-attribute #45

fisherspoon opened this issue May 23, 2021 · 2 comments
Assignees

Comments

@fisherspoon
Copy link

Hi, your library can sort by dates, but my date format is (02.19.2020)
Therefore, I would suggest adding the ability to sort by date attribute in which you can, for example, put time in milliseconds

@LeeWannacott
Copy link
Owner

Hey, I have seen some other libraries using data-attributes and I considered it early on; I try to have as much out of the box as possible, however, I should add this for any sorting edge case the library doesn't sort. I would want to make it as generalisable as possible, so the user can put anything they want after data (not just data-dates) assuming its consistent.

@LeeWannacott LeeWannacott self-assigned this May 24, 2021
@LeeWannacott
Copy link
Owner

LeeWannacott commented May 28, 2021

Added in commit: ee8e7b9 . Users can now use <th class="data-sort"> with <td data-sort=""> to sort by data-attribute rather than the values of the tables column clicked on. Thanks.

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