DataTables / DataTables/Plugins
Custom function stops with pagination + sort/order are not working properly
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi !
I am having some trouble using the tabulator for the last couple of days and I was wondering if you guys can help me out?
From what I can tell is that the function I made "works", however, it seems like it stops whenever the table hits the next page (in the screenshot you will see what I exactly mean). Also, for some reason when the column is order by number it looks like the column looks at the first "big" number which is a 9 and ignores the 2nd digit (e.g. 27 which is also visible in the graph --> temperature column). I did look into the extended plugin, with no success.
`
jQuery.extend(jQuery.fn.dataTableExt.oSort, {
"numeric-comma-pre": function(a) {
var x = a == "-" ? 0 : a.replace(/,/, ".");
return parseFloat(x);
},
"numeric-comma-asc": function(a, b) {
return a < b ? -1 : a > b ? 1 : 0;
},
"numeric-comma-desc": function(a, b) {
return a < b ? 1 : a > b ? -1 : 0;
}
});
`
Is there a function or property what I am missing, because I couldn't find anything in the documentation?
Let me know what you think!


Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the pagination and numeric sorting behavior using the jQuery.extend custom sort handlers shown in the issue. Compare behavior across pages and values such as 9 and 27; the issue is complete when the custom function continues across pagination and numeric ordering is correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100