Blue position line element goes out of whack after ColVis is used to hide the FIRST column

Blue position line element goes out of whack after ColVis is used to hide the FIRST column

AshbjornAshbjorn Posts: 55Questions: 2Answers: 16
edited April 2016 in ColReorder

URL: https://datatables.net/extensions/colreorder/examples/integration/colvis.html

You can hide any column and the drag handle and position element are perfectly fine, but after reordering you then hide the FIRST column and THEN try to reorder the positioning goes berserk.

I have this exact same problem on my own website, but that is only viewable through TeamViewer, however since I could reproduce it on the official example pages, I figured that would provide a better opportunity to debug this. I've been meddling with the _fnMouseMove function to see if this would be where the fix should go but it's late (could also be the index function at the bottom) so I'll take a look when I am back.

I am also still suffering from the body offset issue, but I am just patching that back in after every release for each plugin affected ;-)

Hope this helps,

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,488Questions: 1Answers: 10,467 Site admin
    Answer ✓

    Hi,

    Thanks for letting me know about this. I've just committed the fix and it will be in the nightly shortly.

    Reading ColReorder's code is fairly depressing - it badly needs a refactor, so I've added that to my todo list. I've got an idea how to improve it and also side step the body offset issue. Not sure when I'll get to it, but its on the list and will be part of the next major update to ColReorder.

    Allan

    p.s. Thanks for your help answering other questions in the forum!

  • AshbjornAshbjorn Posts: 55Questions: 2Answers: 16

    Thanks for the commit Allan, can't wait to try it out. Answering some questions is the least I can do in return for your time and effort and has become a recurring activity whenever I find myself dwelling on the forums scouring for issues similar to my current hurdle ;-)

    Btw @allan do you also take (paid) requests to evaluate how DataTables was used for possible improvements etc? I have created quite a complex page that has really challenged me in my knowledge of jQuery and DataTables, I would love to have it reviewed and possibly improved.

    Regardless thanks for the marvelous work on the plugin!

  • allanallan Posts: 63,488Questions: 1Answers: 10,467 Site admin

    Yes, I'm happy to take a look over a page - although I should point out up front that it is quite possible I might not find any improvements (but would still need to charge for the time...!). Depending on how its been setup it might already be optimal!

    Thanks for your kind words :-)

    Allan

This discussion has been closed.