RowReorder snaps back to original position

RowReorder snaps back to original position

cwgregorycwgregory Posts: 5Questions: 1Answers: 0

So far I'm just messing with example code. The RowReorder extension is almost working...but not quite. I can drag a row up or down, but when I let go of the mouse it snaps back to original position. I'm wondering if the current sorting for the table is being reapplied, causing the routine to fail...

http://outsourceyourjobsearch.com/wp-content/themes/Divi-child-02/DataTables-1.10.11/extensions/RowReorder/examples/initialisation/simple.html

Debugger code: akuhox

Replies

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    The number snaps back in your example, but the data in the rest of the rows moves as expected. This is exactly how RowReorder is expected to work. It doesn't just move the DOM nodes, but rather it alters the data in the table. The table has ordering applied to it, so the order of the data is specifically defined by that order (by default in that example the seq. column).

    RowReorder is does not alter the DOM order like jQuery UI sortable, but rather it alters the data in the table.

    Allan

  • cwgregorycwgregory Posts: 5Questions: 1Answers: 0

    OHHHHHH! I was so focused on that row that I didn't realize the data itself was staying put. Thank you so much for explaining...

This discussion has been closed.