Bug: Numbers formatted incorrectly when using 'ColReorder' with 'Responsive'

Bug: Numbers formatted incorrectly when using 'ColReorder' with 'Responsive'

artmusartmus Posts: 9Questions: 4Answers: 0
edited May 2019 in Free community support

Test-Case: http://live.datatables.net/zemofayo/1/edit

First you have to shrink the window so that rows, which contain formatted numbers (in this case column 'Salary-1' and 'Salary-2'), get put into the child row of the 'Responsive' extension. Now you just need to switch the position of two random columns and you'll see that now by displaying the child row, the numbers get displayed incorrectly.

It's the second time I get this kind of issue with formatting numbers where '.' is being used for separating the thousand units and ',' as the decimal seperator (last time I had issues with exporting tables to a pdf file https://datatables.net/forums/discussion/56163 ).
I start to get the feeling that I should stay away from formatting number.. Is there a workaround for this kind of issue or should I rather format numbers through my server-side framework and only use DataTables for displaying the obtained data?

Best regards,
Artur

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,118Questions: 1Answers: 2,583
    Answer ✓

    Hi @artmus ,

    This is probably related to that earlier issue. I've raised it internally again, just in case (DD-912 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • artmusartmus Posts: 9Questions: 4Answers: 0

    Thanks @colin :)

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    I know this is an old one, but I've just done a rewrite of ColReorder and I'm going through the bug list to make sure things are working correctly and I can confirm that this error is fixed in ColReorder 2 which will ship in January next year.

    The issue was the invalidation of the data - it was previously reading from the DOM, which was hopeless since that contained rendered information. ColReorder 2 always uses the original data.

    This is after a reordering action:

    Previously that would result in truncating of data as shown in the original example.

    Allan

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Old Ashton is doing already for himself...

Sign In or Register to comment.