Is RowReorder currently not working?

Is RowReorder currently not working?

icefieldicefield Posts: 45Questions: 19Answers: 1
edited December 2018 in RowReorder

Row always returns to its original location. Tried with Safari 12.0.2 and Chrome 71.0.3578.80.

I tried with my own code (used to work), and with the a couple of examples (including one on your site):

1) http://jsfiddle.net/h4wrmfx3/764/

2) https://editor.datatables.net/examples/extensions/rowReorder.html

This would seem to be a common issue, but didn't see any other recent questions in the Forum about the issue.

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 20,139Questions: 26Answers: 4,735
    edited December 2018

    The Editor example you linked to seems to work. For your example you need to use rowReorder.dataSrc to tell Datatables which column to use as the index column. Your example updated and working:
    http://jsfiddle.net/wLn24x7p/

    Also please see this example with the dataSrc:
    https://datatables.net/extensions/rowreorder/examples/initialisation/ajax.html

    Kevin

  • icefieldicefield Posts: 45Questions: 19Answers: 1

    Kevin - what browser are you using? I'm on OS X Mojave and have tried Safari and Chrome. Both allow me to move the row, but the row then immediately moves back to its original location.

  • kthorngrenkthorngren Posts: 20,139Questions: 26Answers: 4,735

    I'm using a Mac with Chrome 69.0.3497.100. I tried with Safari and it works too. However I forgot to save the updated example:
    http://jsfiddle.net/fw70odn9/

    Kevin

  • icefieldicefield Posts: 45Questions: 19Answers: 1
    edited December 2018

    Pilot error. Apologies.

  • kthorngrenkthorngren Posts: 20,139Questions: 26Answers: 4,735
    Answer ✓

    It looks like its working to me. What exactly do you see thats not working?

    Kevin

  • icefieldicefield Posts: 45Questions: 19Answers: 1

    Never mind -- all's well. My stupid error. Programming too late tonight.

  • kthorngrenkthorngren Posts: 20,139Questions: 26Answers: 4,735
    Answer ✓

    Understandable :smile:

    Kevin

  • James3James3 Posts: 6Questions: 1Answers: 0
    edited February 2020

    The accepted answers fiddle appears to no longer work in Edge 80. Is row reordering broken?

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Yep, it seems to be in a bad state - it's failing here too with a basic example on our site. Thanks for letting us know.

    I've raised it internally (DD-1375 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • REJISREJIS Posts: 4Questions: 1Answers: 0

    What is the status on this "DD-1375"? We are trying to use this and the only way it appears to work is with update set to false, but I'm guessing that isn't actually updating the data and probably just a visual artifact looking like it worked. How does column sorting play into this too? If the table is sorted by a column does this override that, or is that the problem why this isn't working? Setting "order": [] didn't change anything...

  • kthorngrenkthorngren Posts: 20,139Questions: 26Answers: 4,735

    To make sure you are seeing the issue "DD-1375" does the fiddle and the Basic Example not work for you? Seems like this issue is related to using a specific browser as those examples work for me in Chrome.

    If the examples work for you but your code is not then likely you have a different issue. In this case I would suggest opening a new thread so we can help you debug your issue.

    Otherwise @colin can provide an update of DD-1375.

    Kevin

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    It hasn't progressed, I'm afraid. We're aiming to do a sweep of outstanding issues next week, this one may make the cut.

    Colin

  • njeynesnjeynes Posts: 2Questions: 0Answers: 0

    Hi, is there any update on this issue, or a workaround that would let users reorder? Appreciate any update :)

    Thanks

    Nathan

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    I just tried it - this page here was failing before - and everything appears to be working fine now, it must've been fixed by another commit.

    Could you look at that, please, and see if it helps. If it's still not working for you, please can you create a test case, or link to your page, so that we can see the problem. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • njeynesnjeynes Posts: 2Questions: 0Answers: 0

    Thanks Colin, unfortunately when i visit that page in chrome it do-sent work on chrome or edge. When you drop an item it just reverts back to original location, I have Chrome 83.0.4103.97 (Official Build) (64-bit) the latest as far as I'm aware.

    Thanks

    Nathan

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    I just tried with both, and they're working fine for me.

    1. I click and hold on "Ashton Cox" (number 6)
    2. and drag it onto "Tiger Nixon" (number 2)
    3. and Ashton Cox is now 2, and Tiger Nixon is 3

    Does this not happen for you? Are you able to create a video for us to see, please.

    Colin

This discussion has been closed.