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
Extendable tablesort #75
Conversation
Hmm, tests passed for that, however I am sure filesize/dotsep sorting is wrong. These tests should be extended to cover more cases. |
Awesome @xPaw! Before we get this in:
This is a breaking change & should be tagged |
Yeah I guess the other two sorts can be moved out as well, and that would kinda fix the priority issue (you would prioritize by including the files in order you need). I also thought about allowing to specify which sort method to use per column (via |
This is a great idea & addresses #53 nicely. That would probably be a good change in addition to splitting all sorts out of core. |
I've added that, needs testing. |
@tristen Do you know if these lines are still needed, because I think they are not. in
And as far as I know,
|
Yep! looks like those
|
That's because you assigned it as a string: http://jsfiddle.net/thxefs90/ |
Oh derp: http://mistakes.io/#fc11895cd90f7ae05bfa Welp looks like that can go too! |
Awesome work! I'll add words and tests a little later today. |
Move out date/number sorting options Move things around Add data-sort-method Rename events for #66 Remove unnecessary checks Remove unnecessary getInnerText call Extendable tablesort
I squashed my changes into one commit. |
- Split tests out into separate spec scripts - Write better test coverage. Closes #44 - Add demo for `beforeSort` & `afterSort` events. Ref #66 - Move to 2 space indentation. (Sorry, needed to happen) - Add .editorconfig to stabilize this convention for editors that support it. - Document extending Tablesort with custom function - Document data-sort-method. Ref #53 - Fix refresh method when triggering a refresh
This is for #74.
There's one problem with this approach though, because
dotsep
/filesize
sorts get loaded later, they are not considered for sorting becausenumber
sort catches them first. There should be some kind of priority or something, I'm not entirely sure.I've also added names for each sorting method, so it could also be used to fix #53.